summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-10-03 01:18:34 -0700
committerSven Gothel <[email protected]>2009-10-03 01:18:34 -0700
commitcf4c403733363a0e0e06079d85ddae91399696ab (patch)
treefc32b0cef12f1472130ab7ed6e571c2d2df28c7a /src/jogl/classes/javax
parent1304fcd939bea7ea804d2fef22a942848b02a20b (diff)
Offscreen/PBuffer capabilities cleanup ; Generic read drawable support
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLContext.java30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java
index 8ff52b6e9..840de4764 100644
--- a/src/jogl/classes/javax/media/opengl/GLContext.java
+++ b/src/jogl/classes/javax/media/opengl/GLContext.java
@@ -74,6 +74,19 @@ public abstract class GLContext {
public abstract GLDrawable getGLDrawable();
/**
+ * Set the GLDrawable from which this context may be used to
+ * read.<br>
+ * If read is null, the default write drawable will be used.
+ */
+ public abstract void setGLDrawableRead(GLDrawable read);
+
+ /**
+ * Returns the GLDrawable from which this context may be used to
+ * read.
+ */
+ public abstract GLDrawable getGLDrawableRead();
+
+ /**
* Makes this GLContext current on the calling thread.
*
* There are two return values that indicate success and one that
@@ -244,8 +257,21 @@ public abstract class GLContext {
* Classname, GL, GLDrawable
*/
public final String toString() {
- return getClass().getName()+" ["+getGL()+
- ",\n\tDrawable: "+ getGLDrawable()+"] ";
+ StringBuffer sb = new StringBuffer();
+ sb.append(getClass().getName());
+ sb.append(" [");
+ sb.append(getGL());
+ if(getGLDrawable()!=getGLDrawableRead()) {
+ sb.append(",\n\tDrawable Read : ");
+ sb.append(getGLDrawableRead());
+ sb.append(",\n\tDrawable Write: ");
+ sb.append(getGLDrawable());
+ } else {
+ sb.append(",\n\tDrawable Read/Write: ");
+ sb.append(getGLDrawable());
+ }
+ sb.append("] ");
+ return sb.toString();
}
/** Returns a non-null (but possibly empty) string containing the