Inital Double Buffer before Swapbuffer?

Apr 6, 2012 at 4:26 PM

Should I enable double buffer mode before using swapbuffer just like

"glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGB);"

in GLUT?

Thank you guys. ( I am trying to create some animation usign sharpGL. )

Coordinator
Apr 8, 2012 at 12:37 PM

There should be no need to tweak double buffering settings :)

May 29, 2012 at 2:25 PM

Hi...

I am also trying to use the swapbuffer for a kind of animation but it doesnt work... can anybody help me regarding that ....

following is code which i am using in draw callback

            gl.ClearColor(0.0f, 0.0f, 0.0f, 1.0f);
            // Clear the color buffer
            gl.Clear(OpenGL.GL_COLOR_BUFFER_BIT);
            // Swap buffers
            Win32.SwapBuffers(openGLControl.Handle);
           
            // Use white for the background color
            gl.ClearColor(1.0f, 0.0f, 0.0f, 1.0f);
            // Clear the color buffer
            gl.Clear(OpenGL.GL_COLOR_BUFFER_BIT);
            // Swap buffers
            Win32.SwapBuffers(openGLControl.Handle);

One more thing is there any support for glut libs in SharpGL ??
I want to use glutIdle for this animation....

Best Regards