aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/x11
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-06-26 08:52:58 +0000
committerSven Gothel <[email protected]>2008-06-26 08:52:58 +0000
commit3c73be50b6a5f983865bb7617739ce1370fb5566 (patch)
tree8cf2490bddfe56a2f9f27e32999a2948a4dd6936 /src/classes/com/sun/opengl/impl/x11
parentf287efc004e6932cbb2efdf777798a381994ca48 (diff)
Unifying NativeWindow's getWindowHandle() and getSurfaceHandle() usage for all platforms.
On platform's where no distinction of window and surface handle exists, e.g. X11, the window handle is naturally returned by the default 'getSurfaceHandle()' implementation. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1696 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/impl/x11')
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java10
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java8
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java4
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java4
-rw-r--r--src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java8
5 files changed, 17 insertions, 17 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java
index a982a4605..bbb33bd42 100755
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11ExternalGLXDrawable.java
@@ -85,7 +85,7 @@ public class X11ExternalGLXDrawable extends X11GLXDrawable {
GLX.glXQueryContext(display, context, GLX.GLX_SCREEN, val, 0);
int screen = val[0];
NullWindow nw = new NullWindow();
- nw.setWindowHandle(drawable);
+ nw.setSurfaceHandle(drawable);
nw.setScreenIndex(screen);
return new X11ExternalGLXDrawable(factory, nw);
} finally {
@@ -118,7 +118,7 @@ public class X11ExternalGLXDrawable extends X11GLXDrawable {
}
protected int makeCurrentImpl() throws GLException {
- if (drawable.getNativeWindow().getWindowHandle() == 0) {
+ if (drawable.getNativeWindow().getSurfaceHandle() == 0) {
// parent drawable not properly initialized
// FIXME: signal error?
if (DEBUG) {
@@ -141,14 +141,14 @@ public class X11ExternalGLXDrawable extends X11GLXDrawable {
}
if (!GLX.glXMakeContextCurrent(drawable.getNativeWindow().getDisplayHandle(),
- drawable.getNativeWindow().getWindowHandle(),
+ drawable.getNativeWindow().getSurfaceHandle(),
readDrawable,
context)) {
throw new GLException("Error making context current");
} else {
if (DEBUG && VERBOSE) {
System.err.println(getThreadName() + ": glXMakeCurrent(display " + toHexString(drawable.getNativeWindow().getDisplayHandle()) +
- ", drawable " + toHexString(drawable.getNativeWindow().getWindowHandle()) +
+ ", drawable " + toHexString(drawable.getNativeWindow().getSurfaceHandle()) +
", context " + toHexString(context) + ") succeeded");
}
}
@@ -222,7 +222,7 @@ public class X11ExternalGLXDrawable extends X11GLXDrawable {
if (DEBUG) {
System.err.println("Created context " + toHexString(context) +
- " for GLXDrawable " + toHexString(drawable.getNativeWindow().getWindowHandle()));
+ " for GLXDrawable " + toHexString(drawable.getNativeWindow().getSurfaceHandle()));
}
}
}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java
index 2821a3049..457240503 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java
@@ -124,7 +124,7 @@ public abstract class X11GLXContext extends GLContextImpl {
}
protected int makeCurrentImpl() throws GLException {
- if (drawable.getNativeWindow().getWindowHandle() == 0) {
+ if (drawable.getNativeWindow().getSurfaceHandle() == 0) {
if (DEBUG) {
System.err.println("drawable not properly initialized");
}
@@ -141,15 +141,15 @@ public abstract class X11GLXContext extends GLContextImpl {
if (GLX.glXGetCurrentContext() != context) {
if (!GLX.glXMakeContextCurrent(drawable.getNativeWindow().getDisplayHandle(),
- drawable.getNativeWindow().getWindowHandle(),
- drawable.getNativeWindow().getWindowHandle(),
+ drawable.getNativeWindow().getSurfaceHandle(),
+ drawable.getNativeWindow().getSurfaceHandle(),
context)) {
throw new GLException("Error making context current");
} else {
if (DEBUG && (VERBOSE || created)) {
System.err.println(getThreadName() + ": glXMakeCurrent(display " +
toHexString(drawable.getNativeWindow().getDisplayHandle()) +
- ", drawable " + toHexString(drawable.getNativeWindow().getWindowHandle()) +
+ ", drawable " + toHexString(drawable.getNativeWindow().getSurfaceHandle()) +
", context " + toHexString(context) + ") succeeded");
}
}
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java
index 9d5e7ac16..446d6f4e5 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java
@@ -85,7 +85,7 @@ public class X11OffscreenGLXDrawable extends X11GLXDrawable {
pixmap = 0;
throw new GLException("glXCreateGLXPixmap failed");
}
- nw.setWindowHandle(drawable);
+ nw.setSurfaceHandle(drawable);
isDoubleBuffered = (X11GLXDrawableFactory.glXGetConfig(dpy, vis, GLX.GLX_DOUBLEBUFFER, new int[1], 0) != 0);
if (DEBUG) {
System.err.println("Created pixmap " + toHexString(pixmap) +
@@ -103,7 +103,7 @@ public class X11OffscreenGLXDrawable extends X11GLXDrawable {
try {
NativeWindow nw = getNativeWindow();
long display = nw.getDisplayHandle();
- long drawable = nw.getWindowHandle();
+ long drawable = nw.getSurfaceHandle();
if (DEBUG) {
System.err.println("Destroying pixmap " + toHexString(pixmap) +
", GLXPixmap " + toHexString(drawable) +
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java
index 120ec56bb..1741ba72a 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11OnscreenGLXDrawable.java
@@ -69,7 +69,7 @@ public class X11OnscreenGLXDrawable extends X11GLXDrawable {
try {
boolean didLock = false;
- if (component.getWindowHandle() == 0) {
+ if (component.getSurfaceHandle() == 0) {
if (lockSurface() == NativeWindow.LOCK_SURFACE_NOT_READY) {
return;
}
@@ -77,7 +77,7 @@ public class X11OnscreenGLXDrawable extends X11GLXDrawable {
didLock = true;
}
- GLX.glXSwapBuffers(component.getDisplayHandle(), component.getWindowHandle());
+ GLX.glXSwapBuffers(component.getDisplayHandle(), component.getSurfaceHandle());
if (didLock) {
unlockSurface();
diff --git a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
index 0d09f6600..3f29095cb 100644
--- a/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
+++ b/src/classes/com/sun/opengl/impl/x11/glx/X11PbufferGLXDrawable.java
@@ -81,9 +81,9 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable {
getFactory().lockToolkit();
try {
NullWindow nw = (NullWindow) getNativeWindow();
- if (nw.getWindowHandle() != 0) {
- GLX.glXDestroyPbuffer(nw.getDisplayHandle(), nw.getWindowHandle());
- nw.setWindowHandle(0);
+ if (nw.getSurfaceHandle() != 0) {
+ GLX.glXDestroyPbuffer(nw.getDisplayHandle(), nw.getSurfaceHandle());
+ nw.setSurfaceHandle(0);
}
nw.setDisplayHandle(0);
} finally {
@@ -164,7 +164,7 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable {
}
// Set up instance variables
- nw.setWindowHandle(drawable);
+ nw.setSurfaceHandle(drawable);
this.fbConfig = fbConfig;
// Pick innocent query values if multisampling or floating point buffers not available