Sign in to follow this  
corner

uncontrolable flikering

Recommended Posts

i cant get my unit to stop flickering every time i move it i have implemented double screen bufferin in my game what could it be

Share this post


Link to post
Share on other sites
Quote:
Original post by corner
i cant get my unit to stop flickering every time i move it i have implemented double screen bufferin in my game what could it be

Interesting guessing game :).

Ok, if only the unit flickers, you are drawing the screen without the unit between two positions.

For this to happen...

Are you drawing the unit over the same screen every time instead of drawing over the back one whichever it is? This is only possible is you implemented the double buffering manually.

Are you drawing the screen before and after drawing the unit?

Are you switching buffers twice for each draw?


Share this post


Link to post
Share on other sites
Quote:
Original post by corner
im drawing to the screen buffer before it draws to the screen

The thing is, if only a part of the screen flickers, then you must be showing the screen without that part some of the times (usually half).

Find the place where you draw the screen without the part (follow the code from the point where you render the screen to the point where you render the flickering part. If you never draw between those two points, you must be drawing a previous render to the screen at some point.

Share this post


Link to post
Share on other sites
sounds like a znear and zfar plane issue? Try moving the znear further into the scene, and zfar to a suitable position

Share this post


Link to post
Share on other sites
sounds like a znear and zfar plane issue? Try moving the znear further into the scene, and zfar to a suitable position

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