0

I'm learning these tutorials for OpenGL in http://LearnOpenGL.com and I faced with this function glClear ( here at the Rendering title ). Scince I'm still learning Eng as well I have trouble with the world " clear " in this function. (1) What does it mean to clear a buffer bit?

(2) what's the meaning of the word " clear " in these three values below?

GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT and GL_STENCIL_BUFFER_BIT
Master.AKA
  • 117
  • 5
  • https://stackoverflow.com/questions/5479951/what-is-the-purpose-of-gl-color-buffer-bit-and-gl-depth-buffer-bit – Asesh Aug 30 '17 at 11:01

1 Answers1

2

From here: https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glClear.xml

glClear sets the bitplane area of the window to values previously selected by glClearColor, glClearIndex, glClearDepth, glClearStencil, and glClearAccum

So it simply assigns default values to buffer bits.

ikleschenkov
  • 972
  • 5
  • 11