简体   繁体   English

.net onpaint垂直同步

[英].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. 我正在尝试使用winforms和gdi +来实现一些动画,但是我在控件中得到了很多撕裂的精灵。

Is there a way in managed .net to have the overriden Control.OnPaint method wait for the vertical retrace of the monitor? 在托管的.net中有没有办法让覆盖的Control.OnPaint方法等待监视器的垂直回扫?

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. 如果不是,我会怀疑会消除撕裂,并且比试图等待垂直回扫更简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM