Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

clock adjusted to monitor FPS

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 lomateron   Members   

491
Like
0Likes
Like

Posted 30 October 2012 - 07:39 AM

I want to make a line that incrases exactly 1 pixel per monitor frame.
I want to make a float variable that incrases exactly by 1.0f every monitor frame,
I can't do this with GetTickCount() because its not very precise, and getting a clock with higer resolution stills doesnt solve the problem because I want it to be the exact exactinium.
Is there any way to get that moment when the monitor exactly change frames? so if the app runs in another monitor with different refresh rate the line will still increase 1 pixel every monitor frame.
Has anyone any Solution?

#2 Erik Rufelt   Members   

5901
Like
0Likes
Like

Posted 30 October 2012 - 07:49 AM

Just increase it 1 every game loop, and use vsync by providing 1 for the interval in IDXGISwapChain::Present.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.