code: public static JCGLDepthFunction depthFunctionFromGL(
      final int d)
    {
      switch (d) {
        case GL.GL_ALWAYS:
          return JCGLDepthFunction.DEPTH_ALWAYS;
        case GL.GL_EQUAL:
          return JCGLDepthFunction.DEPTH_EQUAL;
        case GL.GL_GREATER:
          return JCGLDepthFunction.DEPTH_GREATER_THAN;
        case GL.GL_GEQUAL:
          return JCGLDepthFunction.DEPTH_GREATER_THAN_OR_EQUAL;
        case GL.GL_LESS:
          return JCGLDepthFunction.DEPTH_LESS_THAN;
        case GL.GL_LEQUAL:
          return JCGLDepthFunction.DEPTH_LESS_THAN_OR_EQUAL;
        case GL.GL_NEVER:
          return JCGLDepthFunction.DEPTH_NEVER;
        case GL.GL_NOTEQUAL:
          return JCGLDepthFunction.DEPTH_NOT_EQUAL;
        default:
          throw new UnreachableCodeException();
      }
    }
docs: Convert depth functions from GL constants.
  
  @param d The GL constant.
  
  @return The value.