PDA

View Full Version : Flickiring in Fullscreen



ahmed.abouraya
11-17-2009, 05:39 AM
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_WIDT H);
devModeScreen.dmPelsHeight=glutGet(GLUT_SCREEN_HEI GHT);
devModeScreen.dmBitsPerPel=16;//getScreenBpp();
devModeScreen.dmFields=DM_PELSWIDTH|DM_PELSHEIGHT| DM_BITSPERPEL;
if((ChangeDisplaySettings(&devModeScreen,CDS_FULLS CREEN)!=DISP_CHANGE_SUCCESSFUL))
fullScreen=false;

Thanks,
Ahmed.

scratt
11-17-2009, 07:59 AM
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. :)

ahmed.abouraya
11-17-2009, 09:13 AM
it's working ,thanks alot