I have a problem with rendering depth in OpenGL
The following code is a simple code example in which a problem occurs. It displays 2 trapeziums in one place, and one of them rotates. But the spinner is always displayed from above, although it should rotate around the first trapezoid.
I assume I messed up something with the initialization of OpenGL. Also, while searching through stackoverflow, I found a message in which someone suggested executing the following code and see the result.
int depth; glGetIntegerv(GL_DEPTH_BITS, &depth); printf("%i bits depth", depth);
well, the output is 0 bits of depth, which is bad, I think :(
I am developing on Mac in xcode with glfw library
#include <GL/glfw.h>
source share