refresh screen
hi, this is my problem:
i draw about a milion of lines, when i pass on the screen opengl with another windows the screen is cancelled where the window passed, so i used glutdisplayfunc() and a subroutine that draw when a event occour, the problem is that the image is all redrawn and blink...have someone have an idea to avoid the problem?thankx,
maurizio
I don't understand your grammar, could you rephrase it or even show us a screenshot please?
Well, if the problem is that you are seeing your scene flickering, then you probably need to enable double buffering.
First enable double buffering using:
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
Then at the end of your render loop, swap the buffers:
glutSwapBuffers();
(more information on proper usage of glut can be found here:
http://www.gamedev.net/reference/articles/article1680.asp)
If instead your problem is that nothing is drawing, then perhaps your need a call glutPostRedisplay() (maybe at the end of your render loop). It has been a while since I last used GLUT, but give those a shot.
Hope this helps.
First enable double buffering using:
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
Then at the end of your render loop, swap the buffers:
glutSwapBuffers();
(more information on proper usage of glut can be found here:
http://www.gamedev.net/reference/articles/article1680.asp)
If instead your problem is that nothing is drawing, then perhaps your need a call glutPostRedisplay() (maybe at the end of your render loop). It has been a while since I last used GLUT, but give those a shot.
Hope this helps.
i'm sorry for my bad english, the problem is flickering because i must redisplay the entire screen everytime a window pass on the screen, example:i have my program opened, then i open notepad and drag the notepad window on my program screen, this window act as a rubber, so i use a callback called every time another winwow drags on my program window, the result is flickering beacuse i have milion of line to display, i'll try double buffering, it is usual that a scene is to be redrawn when another window pass on it?(i use fortran...........)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement