diff options
author | Michael Bien <[email protected]> | 2010-06-10 14:28:03 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-06-10 14:28:03 +0200 |
commit | 2522d4f1ebffec030d7e8c3688e5f952c574c3d0 (patch) | |
tree | 81d631cb11dadc483a4615996dedf773eed083da /src/jogl/classes/javax/media/opengl/GLContext.java | |
parent | 57d3d3f9f9475ae167cd9d33c9450eea66439fd2 (diff) | |
parent | 1d333a771ce0bc7c8594e21d031703f698f06a46 (diff) |
Merge branch 'master' of github.com:sgothel/jogl
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLContext.java')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLContext.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java index efc914de9..21c1b96a0 100644 --- a/src/jogl/classes/javax/media/opengl/GLContext.java +++ b/src/jogl/classes/javax/media/opengl/GLContext.java @@ -278,10 +278,17 @@ public abstract class GLContext { /** * Classname, GL, GLDrawable */ - public final String toString() { + public String toString() { StringBuffer sb = new StringBuffer(); sb.append(getClass().getName()); - sb.append(" [OpenGL "); + sb.append(" ["); + this.append(sb); + sb.append("] "); + return sb.toString(); + } + + public final StringBuffer append(StringBuffer sb) { + sb.append("OpenGL "); sb.append(getGLVersionMajor()); sb.append("."); sb.append(getGLVersionMinor()); @@ -289,6 +296,8 @@ public abstract class GLContext { sb.append(Integer.toHexString(ctxOptions)); sb.append(", "); sb.append(getGLVersion()); + sb.append(", handle "); + sb.append(toHexString(contextHandle)); sb.append(", "); sb.append(getGL()); if(getGLDrawable()!=getGLDrawableRead()) { @@ -300,8 +309,7 @@ public abstract class GLContext { sb.append(",\n\tDrawable Read/Write: "); sb.append(getGLDrawable()); } - sb.append("] "); - return sb.toString(); + return sb; } /** Returns a non-null (but possibly empty) string containing the |