Advertisement

IDirect3DSurface9 flickers seriously

Started by July 30, 2017 01:22 PM
2 comments, last by 21st Century Moose 7 years, 6 months ago

I am wondering why if I use double-buffering in my application, that is setting the back buffer count to one. I get serious flickering just for the IDirect3DSurface9 object. The steps I use to render it is first clear the z buffer, stencil buffer and the render target, then I go into Render2D function first, then do I copy surface, which copies a preloaded managed pool surface to the back buffer, the back buffer is retrieved earlier before. Then I go into the main render function which iterates all game objects, and lastly present it out to the screen, and all over again.

I tried to put the Render2D function within the BeginScene call and outside of it, both result in flickering.

Any ideas how to fix it

Thanks

Jack

Where are all these functions that you mention? If you show your code, there is a good chance someone will be able to help you.

Advertisement

Double-buffering on it's own is insufficient to prevent flickering; you must also use vsync (set PresentationInterval to D3DPRESENT_INTERVAL_ONE in your D3DPRESENT_PARAMETERS).

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement