Sign in to follow this  
kedat

Game plugin draws on screen but FLICKERS

Recommended Posts

kedat    122
I want to code simple plugin that draws on game screen. Here is plugin example from game creator: http://www.rfactor.net/downloads/utils/InternalsPluginsV3.zip This is VC++ project ready to compile. One of the functions returns window handle to games screen so when I code: //in UpdateGraphics finction HDC dc = GetDC( info.mHWND ) ; Rectangle( dc , 0, 0, 100, 100 ) ; ReleaseDC( info.mHWND, dc ) ; but rectangle flickers and when I use buffering it helps little but still flickers

Share this post


Link to post
Share on other sites
Evil Steve    2017
What game are you drawing this over? It's very likely to flicker, because the game will be drawing in WM_PAINT if it uses GDI, or at any time if it uses Direct3D or OpenGL.
The only way I can think of that you'll get around that is to do your drawing just after the app, by hooking WM_PAINT, or by hooking the draw calls.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this