code: public static int primitiveToGL(
      final JCGLPrimitives p)
    {
      switch (p) {
        case PRIMITIVE_LINES:
          return GL.GL_LINES;
        case PRIMITIVE_LINE_LOOP:
          return GL.GL_LINE_LOOP;
        case PRIMITIVE_TRIANGLES:
          return GL.GL_TRIANGLES;
        case PRIMITIVE_TRIANGLE_STRIP:
          return GL.GL_TRIANGLE_STRIP;
        case PRIMITIVE_POINTS:
          return GL.GL_POINTS;
      }
  
      throw new UnreachableCodeException();
    }
docs: Convert primitives to GL constants.
  
  @param p The primitives.
  
  @return The resulting GL constant.