Zeotronic
August 4th, 2008, 01:08 AM
C++/OpenGL: My specific question is about how glClear works... I know there are the four buffers it can clear, but I don't entirely understand how that works... GL_COLOR_BUFFER_BIT seems pretty straight forward to me (though if it's not truely so obvious, please inform me), but if I declare glClear(GL_DEPTH_BUFFER_BIT), for example (and most specifically) what will that do? Does that ignore the depth of all the previous things I rendered, thus allowing me to essentially draw things behind the previously rendered things, through them in a seemingly glitchy manner that I am realizing I may not clearly be explaining? (and made more confusing by writing my realization of such?) I figure I need to know because I might be able to make use of that. So if someone could tell me what glClear(GL_DEPTH_BUFFER_BIT) does, and how to render things regardless of their depth? (though I still want depth testing on... yea, this is a HUD thing)