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