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