How do I use glClipControl[EXT] in OpenGLES?

127 views Asked by At

Can't figure out how do I use glClipControl or glClipControlEXT in OpenGLES? Which one is available in OpenGLES? Does it go from some extension?

Why isn't it listed here https://registry.khronos.org/OpenGL-Refpages/es3/ ?

I am working on RenderDoc's fork and need to make the following code work with OpenGLES:

if(HasExt[ARB_clip_control])
{
  GL.glGetIntegerv(eGL_CLIP_ORIGIN, (GLint *)&ClipOrigin);
  GL.glGetIntegerv(eGL_CLIP_DEPTH_MODE, (GLint *)&ClipDepth);
}
else
{
  ClipOrigin = eGL_LOWER_LEFT;
  ClipDepth = eGL_NEGATIVE_ONE_TO_ONE;
}

// ...

if(GL.glClipControl && HasExt[ARB_clip_control])
  GL.glClipControl(ClipOrigin, ClipDepth);        

but it is not clear enough what condition should I check instead of HasExt[ARB_clip_control] in OpenGLES.

My first idea was to probably check something like IsGLES && GLCoreVersion >=0, but looks like it is not quite correct.

The only thing that I know for sure is that HasExt[ARB_clip_control] is false in OpenGLES and glClipControl simply is not handled by this code.

0

There are 0 answers