XNA Creators Club Online
Page 1 of 1 (2 items)
Sort Posts: Previous Next

game loop with and without vsync

Last post 8/27/2009 5:11 PM by Ralf Kornmann. 1 replies.
  • 8/27/2009 12:50 PM

    game loop with and without vsync

    currently I'm thinking about how to implement a game loop. it should be possible to activate and to deactivate vsync. how do I implement the game loop so that my application cooperates with the vsync? Do I have to set special flags while initializing the ID3D11Device object?

    At the moment my application runs a while loop and processes the message queue. after processing the message queue I call methods in order to update my game logic and draw my objects. should I be aware of being in time with my update and draw algorithms?
  • 8/27/2009 5:11 PM In reply to

    Re: game loop with and without vsync

    Since Direct3D 10 you need to use IDXGISwapChain::Present to get your back buffer on the screen. This function get the sync interval (0 = no vsync) as first parameter. Therefore it’s pretty easy to make it switchable.
Page 1 of 1 (2 items) Previous Next