Original Post
Im trying to do some shadow effects in OpenGL and I need to be able to draw only to the depth buffer (ie not to the screen). When I tried to find the error, I noticed that the following code doesnt work, why is that? glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE); DrawFloor(); glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); DrawFloor(); DrawFloor just draws a quad. But the screen is totally black (if I remove the glColorMask-rows, it'll work). But why isnt the above code working?