glClearDepth - calling directly from dll, and getting errors!

Hi guys,

I’m calling glClearDepth directly from the OpenGL dll, this function only requires a floating point value to be passed, but!!, its crashing my engine!. I could not find any intense information or documentation related to this command, just the normal usage and values required for this function (which is just 1)…

I’ve wrapped 30 functions so far, and got stucked at this one.
I was wondering if anyone called this function directly from the lib (dll) and got similar problems and if you solved it, what was the problem?

The call retrieves a value which is not null, but, still this call crashes the engine. and I already debugged the problem and it comes from this call.


Okey this is funny, in another reference manual

It says theres 2 values this function needs.

NOW… im passing the first one as a null, so its 0… and later the depth.f - this works, but am I losing any functionality by passing a 0 ?

Here too:

the value GLclampd … I never heard of it, how do I get it? whats for? . thanks for supporting my questions :slight_smile:

GLclapmf means values from 0.0f - 1.0f. This func sets “clear depth” value in OpenGL state. Next time when app calls glClearBuffers with GL_DEPTH_BUFFER_BIT then depth buffer will be filled with “clear depth” value.

Common “clear depth” value is 1.0f


This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.