coded4coding wrote on Monday, June 01, 2015:
Hi Everyone…
Do you guys know how to enable depth testing in glfw?
Thank you
coded4coding wrote on Monday, June 01, 2015:
Hi Everyone…
Do you guys know how to enable depth testing in glfw?
Thank you
bastiaanolij wrote on Monday, June 01, 2015:
Hi Ankit,
If I’m not mistaken the depth buffer itself is created by default unless you specify otherwise. After that it just a matter of enabling it in the standard way:
glEnable(GL_DEPTH_TEST);
Make sure to clear the depth buffer at the start of your render loop:
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
coded4coding wrote on Monday, June 01, 2015:
Thank you Bastiaan!