SFML community forums
Help => Window => Topic started by: katrin on October 10, 2008, 02:37:10 pm
-
hi folks,
first of all, i don't use a typical game loop since i'd like to prepare one screen while showing the other. thus i have at least two screens:
sf::VideoMode DesktopMode = sf::VideoMode::GetDesktopMode();
sf::RenderWindow Screen[2] ;
for( i = 0 ; i < 2 ; i++ ) {
Screen[ i ].Create( DesktopMode, "", sf::Style::None ) ;
Screen[ i ].Show( true ) ;
Screen[ i ].SetFramerateLimit( 0 ) ;
Screen[ i ].UseVerticalSync( true );
Screen[ i ].ShowMouseCursor( false ) ;
Screen[ i ].SetBackgroundColor(sf::Color(255, 255, 255));
}
for( i = 0 ; i < 2 ; i++ ) {
Screen[ i ].Display() ;
Screen[ i ].Show( false ) ;
}
...
now, one screen gets prepared, while showing the other:
Screen[ 0 ].Show( true ) ;
Screen[ 1 ].Show( false ) ;
Clock.Reset() ;
Screen[ 0 ].Display() ;
Screen[ 1 ].Draw( text ) ;
WaitUntilMS( Clock, 500 ) ; // waiting for 500ms
Screen[ 1 ].Show( true ) ;
Screen[ 0 ].Show( false ) ;
Clock.Reset() ;
Screen[ 1 ].Display() ;
Screen[ 0 ].Draw( anothertext ) ;
WaitUntilMS( Clock, 50 ) ; // waiting for 50ms
Screen[ 0 ].Show( true ) ;
Screen[ 1 ].Show( false ) ;
Clock.Reset() ;
Screen[ 0 ].Display() ;
Screen[ 1 ].Draw( yetanothertext ) ;
WaitUntilMS( Clock,50 ) ; // waiting for 50ms
...
this code works perfectly well on some computers, but not on others. on the non-working machines the first two displays are okay, while the third display shows a blend of display one and three.
does anybody have any idea or solution or works with muliple screens? my main goal is to prepare one screen, while showing the other.
any help is appreciated,
thanx
katrin
-
Which OS ? Which version of SFML ?
Have you tried with the latest sources from SVN ?
-
Which OS ? Which version of SFML ?
windows xp sp3, sfml 1.3
Have you tried with the latest sources from SVN ?
nope :wink:
-
This problem might be solved in the current sources ; if you can, I advise you to try the SVN version.
-
This problem might be solved in the current sources ; if you can, I advise you to try the SVN version.
okay, i'll try ... but just for the sake of correctness (since that goes beyond, what i usually can do :) ) i would be done with compiling the sfml-[] release dll_win32 and copy the *.a and *.dll files to the corresponding places?!
thanks
-
Yes. You'll have to copy the new headers, too.