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 - katrin

Pages: 1 [2]
16
Window / no game loop: display() problems
« on: October 10, 2008, 04:14:17 pm »
Quote from: "Laurent"
Which OS ? Which version of SFML ?


windows xp sp3, sfml 1.3

Quote from: "Laurent"
Have you tried with the latest sources from SVN ?


nope  :wink:

17
Window / no game loop: display() problems
« 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:

 
Code: [Select]

    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:

Code: [Select]


    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

Pages: 1 [2]
anything