summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/x11/X11ExternalGLContext.java25
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");
+ }
+ }
}