aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/GLBase.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLBase.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLBase.java105
1 files changed, 105 insertions, 0 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLBase.java b/src/jogl/classes/javax/media/opengl/GLBase.java
new file mode 100644
index 000000000..9d88bae58
--- /dev/null
+++ b/src/jogl/classes/javax/media/opengl/GLBase.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ */
+
+package javax.media.opengl;
+
+import java.nio.*;
+
+/**
+ * The base interface from which all GL profiles derive, providing
+ * checked conversion down to concrete profiles, and access to the
+ * OpenGL context associated with the GL.
+ */
+public interface GLBase {
+
+ /**
+ * Indicates whether this GL object conforms to any of the common GL profiles.
+ * @return whether this GL object conforms to any of the common GL profiles
+ */
+ public boolean isGL();
+
+ /**
+ * Indicates whether this GL object conforms to the GL2 profile.
+ * @return whether this GL object conforms to the GL2 profile
+ */
+ public boolean isGL2();
+
+ /**
+ * Indicates whether this GL object conforms to the GLES1 profile.
+ * @return whether this GL object conforms to the GLES1 profile
+ */
+ public boolean isGLES1();
+
+ /**
+ * Indicates whether this GL object conforms to the GLES2 profile.
+ * @return whether this GL object conforms to the GLES2 profile
+ */
+ public boolean isGLES2();
+
+ /**
+ * Indicates whether this GL object conforms to one of the OpenGL ES profiles.
+ * @return whether this GL object conforms to one of the OpenGL ES profiles
+ */
+ public boolean isGLES();
+
+ /**
+ * Indicates whether this GL object conforms to the GL2ES1 profile.
+ * @return whether this GL object conforms to the GL2ES1 profile
+ */
+ public boolean isGL2ES1();
+
+ /**
+ * Indicates whether this GL object conforms to the GL2ES2 profile.
+ * @return whether this GL object conforms to the GL2ES2 profile
+ */
+ public boolean isGL2ES2();
+
+ /**
+ * Casts this object to the GL interface.
+ * @return this object cast to the GL interface
+ * @throws GLException if this GLObject is not a GL implementation
+ */
+ public GL getGL() throws GLException;
+
+ /**
+ * Casts this object to the GL2 interface.
+ * @return this object cast to the GL2 interface
+ * @throws GLException if this GLObject is not a GL2 implementation
+ */
+ public GL2 getGL2() throws GLException;
+
+ /**
+ * Casts this object to the GLES1 interface.
+ * @return this object cast to the GLES1 interface
+ * @throws GLException if this GLObject is not a GLES1 implementation
+ */
+ public GLES1 getGLES1() throws GLException;
+
+ /**
+ * Casts this object to the GLES2 interface.
+ * @return this object cast to the GLES2 interface
+ * @throws GLException if this GLObject is not a GLES2 implementation
+ */
+ public GLES2 getGLES2() throws GLException;
+
+ /**
+ * Casts this object to the GL2ES1 interface.
+ * @return this object cast to the GL2ES1 interface
+ * @throws GLException if this GLObject is not a GL2ES1 implementation
+ */
+ public GL2ES1 getGL2ES1() throws GLException;
+
+ /**
+ * Casts this object to the GL2ES2 interface.
+ * @return this object cast to the GL2ES2 interface
+ * @throws GLException if this GLObject is not a GL2ES2 implementation
+ */
+ public GL2ES2 getGL2ES2() throws GLException;
+
+ /**
+ * Returns the GLContext with which this GL object is associated.
+ * @return the GLContext with which this GL object is associated
+ */
+ public GLContext getContext();
+}