Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SvenB

Pages: 1 [2]
16
Graphics / FlipX and FlipY for sfml strings
« on: November 14, 2008, 03:31:06 pm »
Hi...

for sprites FlipX and FlipY allow to flip them, but for
strings these functions are missing. Unfortunately I
need them. Is there an easy way to get what I need?

Thanks for your help - Sven

17
Graphics / svn: font problem
« on: October 16, 2008, 04:03:07 pm »
Quote from: "Laurent"
Quote
And: the crash at program end on the new pc is bad, too.

This is a known bug (related to the destruction of the default font), which only happens with dynamic SFML libraries.

Regarding the other crash, I still have no idea. But as soon as I have some free time I'll check the graphics contexts stuff, as it seems there are a lot of new issues related to this part of the code.


Okay, thanks for your patience. Meanwhile I go back to 1.3.

Yours - Sven

18
Graphics / svn: font problem
« on: October 16, 2008, 02:06:58 pm »
some more information:

I copied the crashing program to a new computer,
no Code::Blocks there, no sfml there (except the
dlls). It runs okay, but crashes at closing the window
with a message box saying that some instruction at 0x00000000
wants to read memory at 0x00000000 (or similar, the
message box is in german).

Now I have no idea what went wrong on the original computer
due to the transition from sfml-1.3 to the svn-version.
I deleted the whole 1.3 stuff (all directories). I deleted the
1.3 dlls (audio, graphics, network, window, system),
I deleted the 1.3 extlibs (libsndfile-1, openal32), I pointed
compiler and linker to the 1.4 headers and librariers.
Something forgotten?

And: the crash at program end on the new pc is bad, too.

-Sven-

19
Graphics / svn: font problem
« on: October 16, 2008, 12:31:13 pm »
Quote from: "Laurent"
Hmm, are you sure you compiled in debug ? The call stack should at least start from a SFML function.


Hi Laurent,

yes, I compiled in debug mode.
Unfortunately, I don't know how to collect the data you need.

As I said, my debugger is printf(). Maybe someone else familiar with
Code::Blocks' debugging system could instruct me, the C::B manual is
of no help.

In debug mode of C::B there is a window called "Call stack". I posted the information yesterday, just the call to wglChoosePixelFormat () (C:\WINDOWS\system32\opengl32.dll)

The "Current stack frame" gives:
Code: [Select]

Stack level 0, frame at 0x22f4cc:
 eip = 0x5f14680b in wglChoosePixelFormat; saved eip 0x0
 called by frame at 0x22f4d0
 Arglist at 0x22f4c4, args:
 Locals at 0x22f4c4, Previous frame's sp is 0x22f4cc
 Saved registers:
  eip at 0x22f4c8


"Loaded libraries" says:
Code: [Select]

From        To          Syms Read   Shared Object Library
0x7c911000  0x7c9c5e84  Yes         C:\WINDOWS\system32\ntdll.dll
0x7c801000  0x7c907c80  Yes         C:\WINDOWS\system32\kernel32.dll
0x77be1000  0x77c37d74  Yes         C:\WINDOWS\system32\msvcrt.dll
0x674c1000  0x676835c4  Yes         C:\WINDOWS\system32\sfml-graphics-d.dll
0x67981000  0x679dd784  Yes         C:\WINDOWS\system32\sfml-system-d.dll
0x6af41000  0x6af9c72c  Yes         C:\WINDOWS\system32\sfml-window-d.dll
0x77ef1000  0x77f38880  Yes         C:\WINDOWS\system32\gdi32.dll
0x7e361000  0x7e3f0de4  Yes         C:\WINDOWS\system32\user32.dll
0x5f0d1000  0x5f19bed4  Yes         C:\WINDOWS\system32\opengl32.dll
0x77da1000  0x77e49aec  Yes         C:\WINDOWS\system32\advapi32.dll
0x77e51000  0x77ee1494  Yes         C:\WINDOWS\system32\rpcrt4.dll
0x77fc1000  0x77fd0884  Yes         C:\WINDOWS\system32\secur32.dll
0x68fc1000  0x68fdf918  Yes         C:\WINDOWS\system32\glu32.dll
0x736d1000  0x7371a0cc  Yes         C:\WINDOWS\system32\ddraw.dll
0x73b31000  0x73b350c4  Yes         C:\WINDOWS\system32\dciman32.dll
0x76af1000  0x76b1d8b4  Yes         C:\WINDOWS\system32\winmm.dll
0x76331000  0x7634cc6c  Yes         C:\WINDOWS\system32\imm32.dll
0x72211000  0x7223a75a  Yes         C:\WINDOWS\system32\dinput.dll
0x68d91000  0x68d98128  Yes         C:\WINDOWS\system32\hid.dll
0x778f1000  0x779e35a8  Yes         C:\WINDOWS\system32\setupapi.dll
0x76bf1000  0x76c1d4c8  Yes         C:\WINDOWS\system32\wintrust.dll
0x77a51000  0x77ae5fa0  Yes         C:\WINDOWS\system32\crypt32.dll
0x77af1000  0x77b0125c  Yes         C:\WINDOWS\system32\msasn1.dll
0x76c51000  0x76c77054  Yes         C:\WINDOWS\system32\imagehlp.dll
0x746a1000  0x746ebc4c  Yes         C:\WINDOWS\system32\msctf.dll
0x10001000  0x10028b74  Yes         C:\Programme\ScanSoft\OmniPageSE2.0\OpHookSE2.dll
0x774b1000  0x775ec0d4  Yes         C:\WINDOWS\system32\ole32.dll
0x770f1000  0x7717a414  Yes         C:\WINDOWS\system32\oleaut32.dll
0x77bd1000  0x77bd7300  Yes         C:\WINDOWS\system32\version.dll
0x75251000  0x7527dba0  Yes         C:\WINDOWS\system32\msctfime.ime


From loaded libraries you can see the debug-dlls were used.

Any hints?

Yours - Sven

20
Graphics / svn: font problem
« on: October 15, 2008, 05:40:00 pm »
Quote from: "Laurent"
wglChoosePixelFormat is called at window creation (sf::RenderWindow constructor), it has nothing to do with fonts... really weird.

Can you print the call stack with your debugger (sorry I don't know how to do it with Code::Blocks) ?


Don't know whether this is what you want, the call stack window of
Code::Blocks gives this:

Nr  Adress      Function                            File
0   5F14680B   wglChosePixelFormat()     C:\Windows\system32\opengl32.dll
1   00000000   ??()

-Sven-

21
Graphics / svn: font problem
« on: October 15, 2008, 03:48:07 pm »
Quote from: "Laurent"
No. Maybe you can try to compile in debug mode and use your debugger.


Hi,

funny additional information:

font-loading crashes for several fonts in several sizes,
except: arial 100 runs okay

-Sven-

22
Graphics / svn: font problem
« on: October 15, 2008, 03:33:37 pm »
Quote from: "Laurent"
No. Maybe you can try to compile in debug mode and use your debugger.


Well.... I'm an old C-programmer, my debugger is printf() ;-)

Okay, okay, I built the debug-versions and compiled to debug, the
following very short program:

Code: [Select]

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow App(sf::VideoMode(800, 600), "SFML Fonts");

    sf::Font MyFont;
    if (!MyFont.LoadFromFile("c:\\windows\\fonts\\comic.ttf", 50))
        return EXIT_FAILURE;

    App.Close() ;
    return EXIT_SUCCESS;
}


The debugger says:

Debugger name and version: GNU gdb 6.7.50.20071127
Child process PID: 1796
Program received signal SIGSEGV, Segmentation fault.
In wglChoosePixelFormat () (C:\WINDOWS\system32\opengl32.dll)

Is this of any help for you?

-Sven-
[/code]

23
Graphics / svn: font problem
« on: October 15, 2008, 02:31:50 pm »
Quote from: "Laurent"
Are you sure you don't mix debug and release buils, or CRT versions ? Are you sure you don't have SFML 1.3 headers or binaries which may conflict ?


I just deleted all the 1.3 stuff, including the dlls. I updated the
svn-version, recompiled it, used only the latest files
(dlls, headers, *.a). I built the release-version, compiled the
demo-program to release-version (dynamic, not static).
Same error as before.

Any ideas?

24
Graphics / svn: font problem
« on: October 15, 2008, 02:01:50 pm »
Hi,

I switched from sfml 1.3 to the svn-version, now I experience
a fundamental problem with fonts:

the program crashes after font loading with error code
0xC0000005.

I verified this with the sfml tutorial demo graphics-fonts.cpp

Any help is appreciated,

Sven

25
Window / useless UseVerticalSync()?!?
« on: September 12, 2008, 02:22:36 pm »
Hi all,

while testing frame rates I came upon the following problem: changing between UseVerticalSync(true) and UseVerticalSync(false) does not make any difference. On my desktop computer I have a frame rate of 250 Hz (graphics card set to 60 Hz) irrespective of VerticalSync true or false. On my Laptop I have a frame rate of 40 (!) Hz (graphics card set to 60 Hz).


Code: [Select]
 while( Screen0.IsOpened() ) {
        Screen0.UseVerticalSync(true);  // or false
        Clock.Reset() ;
        do {
            Screen0.Draw( Text ) ;
            Framerate = 1.0f / Screen0.GetFrameTime();
            std::sprintf( buf, "Refreshrate %5.2f Hz", Framerate ) ;
            Text2.SetText( buf ) ;
            Screen0.Draw( Text2 ) ;
            Screen0.Display() ;
        } while( Clock.GetElapsedTime() < 5.0f ) ;
      Screen0.Close() ;
    }


Obviously UseVerticalSync does not work. Does anybody have any idea why?

26
Graphics / Problem with frame times
« on: July 10, 2008, 01:48:56 pm »
Hi, I'm just checking the display timing (sfml 1.3, WinXP SP3) and do
not understand all the results...

Code: [Select]
Screen0.UseVerticalSync(true);
        Clock.Reset() ;
        do {
            Screen0.Draw( Text ) ;
            Text.Move( 1,1 ) ;
            times[ i++ % 100 ] = Screen0.GetFrameTime() ;
            Screen0.Display() ;
        } while( Clock.GetElapsedTime() < 2.0f ) ;


Since the graphics refresh rate is 60 Hz, I expected a 16.6 ms frame time.
Actually, the frame times are 16.5 to 16.8 ms. That's fine.

Now, I'm doing the same without any output to the screen:

Code: [Select]
Screen0.UseVerticalSync(true);
        Clock.Reset() ;
        do {
             times[ i++ % 100 ] = Screen0.GetFrameTime() ;
            Screen0.Display() ;
        } while( Clock.GetElapsedTime() < 2.0f ) ;


Again I expect 16.6 ms frame time but I get 14.5 to 14.7 ms.
How is this possible with 60 Hz refresh rate and UseVerticalSync( true )?

Now I switched off vertical sync:

Code: [Select]
Screen0.UseVerticalSync(false);
        Clock.Reset() ;
        do {
             times[ i++ % 100 ] = Screen0.GetFrameTime() ;
            Screen0.Display() ;
        } while( Clock.GetElapsedTime() < 2.0f ) ;


Same timing results... as if UseVerticalSync(false) does not work.

Now I tried a little bit more graphics and vertical sync on:

Code: [Select]
Screen0.UseVerticalSync(true);
        Clock.Reset() ;
        do {
            Screen0.Draw( Line ) ;
            Screen0.Draw( Circle ) ;
            Screen0.Draw( Rect ) ;
            Screen0.Draw( Text ) ;
            Screen0.Draw( Polygon ) ;
            Text.Move( 1,1 ) ;
            Circle.Move(1,-1) ;
            Rect.Rotate(1) ;
            times[ i++ % 100 ] = Screen0.GetFrameTime() ;
            Screen0.Display() ;
        } while( Clock.GetElapsedTime() < 2.0f ) ;


This results in frame times of approx. 18-19 ms. How that? With
UseVerticalSync(true) I expect frame times as integer multiples of
1000 / FrameRate, for a 60 Hz graphics card 16.6 or 33.2 and so on.

Any idea?

Thanks in advance - Sven

27
General / SFML to control cognitive psychology experiments
« on: July 08, 2008, 08:13:32 pm »
Quote
I'm not sure SFML interfaces to the parallel port...


We already have a hint to a solution for this problem,
independent from sfml.

By the way:
how precise is the sfml-timer?

Thanks in advance - Sven

28
General / SFML to control cognitive psychology experiments
« on: July 08, 2008, 05:09:50 pm »
Hi,

we are currently looking for a new programming environment/libraries
to program experiments for cognitive psychology. Until today we are
working with DOS (full hardware control), but a transition to windows
is unavoidable ...

Okay, we need high precision timing, access to the parallel port
AND good control of the display/screen. I would like to ask especially
for the display issue some questions. Maybe someone can give
use the necessary information to opt for or against sfml.

We always need more than one graphics display, one visible, the
others virtual screens, sometimes called double buffering or page
flipping. All screens are fully prepared (rendered) before the presentation
starts to avoid any latencies due to time consuming graphics commands
or file access to load pictures or whatelse.

A typical instruction sequence looks like this (pseudo-code)

for ( trial=1; trial < maxtrials; trial++ ) {
   prepare_all_screens() ;
   show_screen_1_for_some_time();
   show_screen_2_for_some_time();
   show_screen_3();
   start_timer();
   wait_for_participant_response();
   stop_timer();
}

Is it possible to have multiple virtual screens with sfml,
rendering to invisible screens, switching beween screens,
switching synchronized with the vertical retrace?

Thanx in advance - Sven

Pages: 1 [2]