aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/macosx/cgl
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/macosx/cgl
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/macosx/cgl')
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java4
-rw-r--r--src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java10
2 files changed, 7 insertions, 7 deletions
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java
index ad71774b5..ff5fbbdff 100644
--- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java
@@ -135,7 +135,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl
try {
// Try to allocate a context with this
nsContext = CGL.createContext(share,
- drawable.getNativeWindow().getWindowHandle(),
+ drawable.getNativeWindow().getSurfaceHandle(),
pixelFormat,
viewNotReady, 0);
if (nsContext == 0) {
@@ -232,7 +232,7 @@ public abstract class MacOSXCGLContext 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");
}
diff --git a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
index 6efe175fe..d5291af39 100644
--- a/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
+++ b/src/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
@@ -66,9 +66,9 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
try {
NullWindow nw = (NullWindow) getNativeWindow();
- if (nw.getWindowHandle() != 0) {
- impl.destroy(nw.getWindowHandle());
- nw.setWindowHandle(0);
+ if (nw.getSurfaceHandle() != 0) {
+ impl.destroy(nw.getSurfaceHandle());
+ nw.setSurfaceHandle(0);
if (DEBUG) {
System.err.println("Destroyed pbuffer: " + nw);
@@ -86,7 +86,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
}
public long getPbuffer() {
- return getNativeWindow().getWindowHandle();
+ return getNativeWindow().getSurfaceHandle();
}
public void swapBuffers() throws GLException {
@@ -134,7 +134,7 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
if (pBuffer == 0) {
throw new GLException("pbuffer creation error: CGL.createPBuffer() failed");
}
- nw.setWindowHandle(pBuffer);
+ nw.setSurfaceHandle(pBuffer);
} finally {
getFactory().unlockToolkit();
}