OpenGL - Explain glutInitDisplayMode ()

Explain in detail what functions are provided by the settings in the line:

glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH); 

So far, I know that this line initializes the display mode by requesting a double buffer setting the RGBA window mode and requesting the depth buffer, but how can I explain this more simply. I want to describe each argument in plain English

+4
source share
1 answer
 glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH); 

glutInitDisplayMode - in display mode

GLUT_DOUBLE - allows displaying a double buffer in a window

GLUT_RGBA - shows the color (red, green, blue) and alpha

GLUT_DEPTH - allows you to use the depth buffer

http://www.opengl.org/documentation/specs/glut/spec3/node12.html

+14
source

Source: https://habr.com/ru/post/1412974/


All Articles