Flickiring in Fullscreen

hi all,
Does anyone know how to stop the flickiring in fullscreen?, at first in normal mode,there wasnt any flickiring,i used this code in the main method to display the output in fullscreen,
glutDisplayFunc(drawSolarSystem); // register redraw function
bool fullScreen=true;
glutFullScreen();
DEVMODE devModeScreen;
memset(&devModeScreen,0,sizeof(devModeScreen));
devModeScreen.dmSize=sizeof(devModeScreen);
devModeScreen.dmPelsWidth=glutGet(GLUT_SCREEN_WIDTH);
devModeScreen.dmPelsHeight=glutGet(GLUT_SCREEN_HEIGHT);
devModeScreen.dmBitsPerPel=16;//getScreenBpp();
devModeScreen.dmFields=DM_PELSWIDTH|DM_PELSHEIGHT|DM_BITSPERPEL;
if((ChangeDisplaySettings(&devModeScreen,CDS_FULLSCREEN)!=DISP_CHANGE_SUCCESSFUL))
fullScreen=false;

Thanks,
Ahmed.

http://www.cs.arizona.edu/classes/cs433/spring02/opengl/dblbuffer.html

You may also look into V-Sync-ing to stop “tearing” once you have double buffering working. :slight_smile:

it’s working ,thanks alot