glSwapBuffers
Hi all.
Could anyone please let me know as to how can smooth animation be done in opengl. I tried glswapbuffers(display a black rectangle and a wgite one after a gap of 1 sec between the two.) hoping that i will not see any tearing down of images but it is didnot help.
Any answers will be appreciated.
Thank you.
Tell me More
are you using glut? Do you mean glutSwapBuffers? If you are using win32 api
then it is SwapBuffers(whatever hda). If you are using glut you need to do
glutInit(GLUT_RGBA|GLUT_DOUBLE) ored with whatever else you need. Need more
info to help. If you are using win32, then you need to set up your
PIXELFORMATDESCRIPTOR to use double buffering. Something like,
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
then it is SwapBuffers(whatever hda). If you are using glut you need to do
glutInit(GLUT_RGBA|GLUT_DOUBLE) ored with whatever else you need. Need more
info to help. If you are using win32, then you need to set up your
PIXELFORMATDESCRIPTOR to use double buffering. Something like,
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement