code: public static JCGLBlendFunction blendFunctionFromGL(
      final int type)
    {
      switch (type) {
        case GL14.GL_CONSTANT_ALPHA:
          return JCGLBlendFunction.BLEND_CONSTANT_ALPHA;
        case GL14.GL_CONSTANT_COLOR:
          return JCGLBlendFunction.BLEND_CONSTANT_COLOR;
        case GL11.GL_DST_ALPHA:
          return JCGLBlendFunction.BLEND_DESTINATION_ALPHA;
        case GL11.GL_DST_COLOR:
          return JCGLBlendFunction.BLEND_DESTINATION_COLOR;
        case GL11.GL_ONE:
          return JCGLBlendFunction.BLEND_ONE;
        case GL14.GL_ONE_MINUS_CONSTANT_ALPHA:
          return JCGLBlendFunction.BLEND_ONE_MINUS_CONSTANT_ALPHA;
        case GL14.GL_ONE_MINUS_CONSTANT_COLOR:
          return JCGLBlendFunction.BLEND_ONE_MINUS_CONSTANT_COLOR;
        case GL11.GL_ONE_MINUS_DST_ALPHA:
          return JCGLBlendFunction.BLEND_ONE_MINUS_DESTINATION_ALPHA;
        case GL11.GL_ONE_MINUS_DST_COLOR:
          return JCGLBlendFunction.BLEND_ONE_MINUS_DESTINATION_COLOR;
        case GL11.GL_ONE_MINUS_SRC_ALPHA:
          return JCGLBlendFunction.BLEND_ONE_MINUS_SOURCE_ALPHA;
        case GL11.GL_ONE_MINUS_SRC_COLOR:
          return JCGLBlendFunction.BLEND_ONE_MINUS_SOURCE_COLOR;
        case GL11.GL_SRC_ALPHA:
          return JCGLBlendFunction.BLEND_SOURCE_ALPHA;
        case GL11.GL_SRC_COLOR:
          return JCGLBlendFunction.BLEND_SOURCE_COLOR;
        case GL11.GL_SRC_ALPHA_SATURATE:
          return JCGLBlendFunction.BLEND_SOURCE_ALPHA_SATURATE;
        case GL11.GL_ZERO:
          return JCGLBlendFunction.BLEND_ZERO;
        default:
          throw new UnreachableCodeException();
      }
    }
docs: Convert blend functions from GL constants.
  
  @param type The GL constant.
  
  @return The value.