David Suarez
David Suarez

Reputation: 1140

.net onpaint vertical sync

I'm trying to implement some animation using winforms and gdi+, but I get a lot of tearing moving sprites inside a control.

Is there a way in managed .net to have the overriden Control.OnPaint method wait for the vertical retrace of the monitor?

Upvotes: 4

Views: 1593

Answers (1)

Logan Capaldo
Logan Capaldo

Reputation: 40346

Are you already using double buffering? If not I would suspect that would remove the tearing, and it is simpler than trying to wait for the vertical retrace.

Upvotes: 1

Related Questions