I am new for OPENGL.
environment is WIN7 64 + vs2010.
I’m sure that the problem is nothing concerned with the software environment.
In my laptop,glutInitDisplayMode(GLUT_SINGLE) doesn’t work
I have to use glutInitDisplayMode(GLUT_double) to make the results all right.
let me give you an eample:
codes above operated in my laptop only show all white,title is right but no black background and no square.
But if i use glutInitDisplayMode(GLUT_double) and glutSwapBuffers(); everything is right.
why this happened? is it resulted from my graphics card?Is there any thing i can do to revise the problem?
Single buffered modes are problematic since the introduction of WDDM and desktop compositing in Windows Vista. To be honest this isn’t a problem - there’s no real valid reason to use a single buffered mode and double buffered modes aren’t particularly advanced or difficult to set up or manage, so just create double buffered modes instead.
Maybe, maybe not. I doubt there is a difference - you have standard hardware, a widely used OS, presumably you keep your drivers up to date. You’re doing everything right.
The problem is that a lot of GLUT tutorials are old. Really really old. Like 20 or more years old. And back then hardware was different and some hardware might not support a double-buffered context. But a single-buffered context would work on everything, so these really really old GLUT tutorials for really really old hardware used single-buffered contexts. Time passes, hardware changes, drivers change, but GLUT tutorials are never updated properly so they’re no longer suitable to modern hardware.