Results 1 to 3 of 3

Thread: How do I have a function get called on vsync?

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2008
    Posts
    1,181

    How do I have a function get called on vsync?

    I would like to know if there's a vsync Windows api function that can register a function to get called on vsync, something maybe could be used like this in VB6:
    Code:
    RegisterFunctionForVSync AddressOf MyFunction
    That way whenever the computer's graphics card fired vsync, my function called MyFunction would get called and its code executed (code responsible for drawing something new to the screen each time the monitor displayed a new frame), which would allow me to make sure that the display in my program only got updated EXACTLY at the moment that the screen was drawn (could be useful for games). Otherwise there's no way to prevent the display from being updated too soon or too late. I think DirectX used to allow you to do that, but it required the DirectX VB6 SDK, and this is no longer supplied by Microsoft. So I'm wondering if there's any similar function that is directly built into the Windows API.
    Last edited by Ben321; Sep 13th, 2017 at 07:37 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width