Source code for picogl.backend.gl.wrappers.depth

"""
depth functions
"""

from OpenGL.GL import glGetBooleanv
from OpenGL.raw.GL.VERSION.GL_1_0 import GL_DEPTH_WRITEMASK, glDepthMask, glDepthFunc

from picogl.boolean import GLBoolean

from OpenGL.raw.GL.VERSION.GL_1_0 import glClearDepth


[docs] def gl_depth_func(func: "GLDepthFunc") -> None: glDepthFunc(func)
[docs] def gl_get_depth_mask(): return glGetBooleanv(GL_DEPTH_WRITEMASK)
[docs] def gl_set_depth_mask(flag): glDepthMask(GLBoolean.TRUE if flag else GLBoolean.FALSE)
[docs] def gl_clear_depth(depth): glClearDepth(depth)