开发者

V-Sync in MFC and GDI+

开发者 https://www.devze.com 2023-02-03 15:20 出处:网络
hi I\'m using MFC SDI application for my mid term project. but every time i draw scene (with GDI) and \"invalidate()\"it flicking occur.

hi I'm using MFC SDI application for my mid term project. but every time i draw scene (with GDI) and "invalidate()" it flicking occur.

I use DWM for double buffering and removing flicking but it rarely occur. i think problem is in the vertical 开发者_如何学Csyncing.what can I do for enabling virtual syncing


Try overriding OnEraseBkgnd and simply return TRUE and do nothing else. This will prevent the background being "erased" each time you draw. Returning TRUE says "I've erased it`, even if you've done no such thing.

0

精彩评论

暂无评论...
验证码 换一张
取 消