Custom Object Overlapping
I have the following issue with OpenGL. When I render two different colored lines overlapping, a mixture of them is displayed looking ugly. I'd like to learn how to set OpenGL to depth test, but when two objects are overlapping render the last one drawn only. If my question is unclear please let me know.
glDisable( GL_BLEND ). That'll stop any color "mixing". The last write will just replace what was there before.
For the depth test: glEnable( GL_DEPTH_TEST ); glDepthFunc( GL_LEQUAL );