I want to use the depth to set fragment color....
I have tried
but when I run my app, I get the following:Code :gl_FragColor = vec4(gl_FragDepth, 0.0, 0.0, 1.0);
"warning C7506: OpenGL does not define the global variable gl_FragDepth"
I thought gl_FragDepth was a valid variable....



