Skip to main content
gamedev.net
🔒 Locked

Vertical blank

Started by Gunner Sep 9, 2000 at 7:27 PM 2 replies 400+ views
Original Post
Gunner
Gunner
Hi all, What''s the windows call for ''vait for vertical blank'' ? Delphi style if possible. I''m doing a couple of non-directx (still fullscreen)tests and i''d like to sync my blits so that they don''t occur while a retrace is. Thanks Gunner
Sly
Sly
I do not believe there is one. To get smooth animation in Windows, render to an off-screen bitmap and then blit the whole thing to the canvas of the visible component in one hit. Delphi 5 added the DoubleBuffered property (or was that Delphi 4?) to the visual components and this handles all that for you.



Steve 'Sly' Williams
Tools Developer
Krome Studios
Gunner
Gunner
Thanks Sly, I didn''t know that.

Gunner.
delphi3d
delphi3d
I think rendering to an offscreen bitmap and then blitting can still cause flicker if you blit during a vertical retrace?

As far as I know, you have to use ASM if you want to synchronize to the vertical retrace. Then again, I think most video cards allow you to enable/disable Vsync in their driver control panels.



Tom Nuydens
delphi3d@gamedeveloper.org
www.gamedeveloper.org/delphi3d
Tom Nuydens delphi3d@gamedeveloper.org www.gamedeveloper.org/delphi3d

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.