diff options
author | Kenneth Russel <[email protected]> | 2006-01-10 22:12:15 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-01-10 22:12:15 +0000 |
commit | 30211457260340356a16bcb5ce5df274a8ad1dc0 (patch) | |
tree | 9bdd5d453e1147561d604dec4709af838f4137f8 /src | |
parent | 22f21777d6a9460618279d4011f477e434486463 (diff) |
Fixed problem with X11ExternalGLContext pointed out by m.engelhardt on
javagaming.org forums which showed up when using JOGL with SWT
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@531 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src')
-rwxr-xr-x | src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java b/src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java index 411f7c89f..ae61c0063 100755 --- a/src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java +++ b/src/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java @@ -51,6 +51,7 @@ public class X11ExternalGLContext extends X11GLContext { lockToolkit(); try { context = GLX.glXGetCurrentContext(); + drawable = new Drawable(GLX.glXGetCurrentDisplay()); } finally { unlockToolkit(); } @@ -80,4 +81,28 @@ public class X11ExternalGLContext extends X11GLContext { public boolean isCreated() { return created; } + + // Need to provide the display connection to extension querying APIs + class Drawable extends X11GLDrawable { + Drawable(long display) { + super(null, null); + this.display = display; + } + + public GLContext createContext(GLContext shareWith) { + throw new GLException("Should not call this"); + } + + public int getWidth() { + throw new GLException("Should not call this"); + } + + public int getHeight() { + throw new GLException("Should not call this"); + } + + public void setSize(int width, int height) { + throw new GLException("Should not call this"); + } + } } |