code: public static JCGLScalarType scalarTypeFromGL(
      final int type)
    {
      switch (type) {
        case GL.GL_HALF_FLOAT:
          return JCGLScalarType.TYPE_HALF_FLOAT;
        case GL.GL_BYTE:
          return JCGLScalarType.TYPE_BYTE;
        case GL.GL_UNSIGNED_BYTE:
          return JCGLScalarType.TYPE_UNSIGNED_BYTE;
        case GL.GL_SHORT:
          return JCGLScalarType.TYPE_SHORT;
        case GL.GL_UNSIGNED_SHORT:
          return JCGLScalarType.TYPE_UNSIGNED_SHORT;
        case GL2ES2.GL_INT:
          return JCGLScalarType.TYPE_INT;
        case GL.GL_UNSIGNED_INT:
          return JCGLScalarType.TYPE_UNSIGNED_INT;
        case GL.GL_FLOAT:
          return JCGLScalarType.TYPE_FLOAT;
        default:
          throw new UnreachableCodeException();
      }
    }
docs: Convert types from GL constants.
  
  @param type The GL constant.
  
  @return The value.