diff options
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLContext.java | 30 |
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 |