glEnable(GL_CULL_FACE) and glEnable(GL_DEPTH_TEST)

Hello all!

When Have I to use glEnable(GL_CULL_FACE) and/or glEnable(GL_DEPTH_TEST) ?

Without none enabled I get:

With both enabled I get:

I’m asking this because, in my app, when I enable both, I get the same results that when I enable only GL_DEPTH_TEST.
So Can I disable GL_CULL_FACE without problems?

Thank you and sorry for my english!

GL_CULL_FACE is to be enabled for performance reasons, as it easily removes half of the triangles to draw, normally without visual artifacts if your geometry is watertight, and CCW.
GL_DEPTH_TEST is to be enabled to avoid ugly artifacts that depend on the angle of view and drawing order (otherwise ie. if back of the cube is drawn last, if will appear “above” the front of the cube).
So yes, both should be enabled.

Ok thank you Zbuffer!