Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I implemented an orbit camera in my own OpenGL ES 2.0 application. I was getting extensive amount of flicker while rotating the camera using the mouse.

When I added the line eglSwapInterval( ..., 0.1); after eglSwapBuffers() and then the flicker immediately stopped. I am not able to understand why eglSwapInterval solves the flicker problem? (The FPS of my app prior to eglSwapInterval was around 700FPS)

(The flicker is NOT due to z-fighting because I have set near and far clip planes as 100 and 500)

share|improve this question
Was the entire screen/window flickering? Or just parts of it? –  Nic Foster Jul 3 '12 at 20:57
Z-fighting happens when 2 triangles are so close that they are at the same place on the screen and practically at the same distance from the camera. Because of the limited precision of the depth buffer and depth calculations the result of which triangle is closer to the screen is unstable hence you see the flickering. Setting the Far and Near can help in case this changes the depth buffer's Far and Near as well but doesn't erase the problem totally. Having said all this I don't think it's a Z-fighting issue but I just wanted to explain what Z-fighting is. –  Roy T. Jul 3 '12 at 21:05
Entire screen was flickering –  seahorse Jul 4 '12 at 3:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.