code: public static int stencilFunctionToGL(
      final JCGLStencilFunction function)
    {
      switch (function) {
        case STENCIL_ALWAYS:
          return GL.GL_ALWAYS;
        case STENCIL_EQUAL:
          return GL.GL_EQUAL;
        case STENCIL_GREATER_THAN:
          return GL.GL_GREATER;
        case STENCIL_GREATER_THAN_OR_EQUAL:
          return GL.GL_GEQUAL;
        case STENCIL_LESS_THAN:
          return GL.GL_LESS;
        case STENCIL_LESS_THAN_OR_EQUAL:
          return GL.GL_LEQUAL;
        case STENCIL_NEVER:
          return GL.GL_NEVER;
        case STENCIL_NOT_EQUAL:
          return GL.GL_NOTEQUAL;
      }
  
      throw new UnreachableCodeException();
    }
docs: Convert stencil functions to GL constants.
  
  @param function The function.
  
  @return The resulting GL constant.