flickering viewports

Started by
1 comment, last by magneeto 17 years, 9 months ago
hi, i'm writing an opengl program where i have two viewports in that same window. one is bigger than the other. in the bigger viewport i have a rotating sphere. the problem is that the smaller viewport flickers all the time. but if i don't rotate the object then there is no flickering. both the viewports show the same object. how do i get rid of this problem? magneeto
Advertisement
We will probably need more data about what exactly you are doing (perhaps some source code) in order to be much help here. A couple thoughts though:

1. Are you using double buffering? If not, try switching to a double buffered pixel format and see if that helps. In general this should reduce flickering.

2. Are you clearing when you don't need too? A static scene won't flicker if you are just drawing the same thing over and over, but clears with a single buffered window can cause flickering.

3. Viewports do not clip glClear. This means that clearing one viewport will clear the other. Use a quad to clear the area, or use glScissor.
i am using double buffering and i am not clearing too much also. the source is really long and i don't know which part to attach. i'll try to give some more information about what i'm doing.

i have a textured mapped earth (actually multiple texture mapping--there is a rotating cloud aroud it). the earth is rotating in both the viewports. and when i stop this rotation (disabling it in the idle function) there is no flickering. as soon as i start the rotation one of the viewports start flickering. is this because of the texture mapping ?

This topic is closed to new replies.

Advertisement