aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl/macosx
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-09-15 00:43:27 +0200
committerSven Gothel <[email protected]>2010-09-15 00:43:27 +0200
commitdc9191f1733960d8a035b5fb8c5f8314f54a0ca7 (patch)
tree601b6526b1ffe66eee87efb3ad206195c64b1d57 /src/jogl/classes/com/jogamp/opengl/impl/macosx
parent579754592a8bb9175ea49f983c8f2b58c448d317 (diff)
Misc Cleanups
- www/index.html: absolute local refs -> relative - Platform GLContextImpl specialisations: remove local overriding drawable instance - X11ExternalGLXDrawable: Remove dead code, left over.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/macosx')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java2
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java8
2 files changed, 3 insertions, 7 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java
index 568204384..e494fd121 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXOnscreenCGLContext.java
@@ -46,12 +46,10 @@ import javax.media.opengl.*;
import com.jogamp.opengl.impl.*;
public class MacOSXOnscreenCGLContext extends MacOSXCGLContext {
- protected MacOSXOnscreenCGLDrawable drawable;
public MacOSXOnscreenCGLContext(MacOSXOnscreenCGLDrawable drawable,
GLContext shareWith) {
super(drawable, shareWith);
- this.drawable = drawable;
}
protected void makeCurrentImpl(boolean newCreated) throws GLException {
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java
index 9c630d24b..3964c9771 100644
--- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java
+++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXPbufferCGLContext.java
@@ -9,7 +9,6 @@ import javax.media.nativewindow.*;
import com.jogamp.opengl.impl.*;
public class MacOSXPbufferCGLContext extends MacOSXCGLContext {
- protected MacOSXPbufferCGLDrawable drawable;
// State for render-to-texture and render-to-texture-rectangle support
private int textureTarget; // e.g. GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE_NV
@@ -28,7 +27,6 @@ public class MacOSXPbufferCGLContext extends MacOSXCGLContext {
public MacOSXPbufferCGLContext(MacOSXPbufferCGLDrawable drawable,
GLContext shareWith) {
super(drawable, shareWith);
- this.drawable = drawable;
initOpenGLImpl();
}
@@ -45,8 +43,8 @@ public class MacOSXPbufferCGLContext extends MacOSXCGLContext {
}
protected void makeCurrentImpl(boolean newCreated) throws GLException {
- if (getOpenGLMode() != drawable.getOpenGLMode()) {
- setOpenGLMode(drawable.getOpenGLMode());
+ if (getOpenGLMode() != ((MacOSXPbufferCGLDrawable)drawable).getOpenGLMode()) {
+ setOpenGLMode(((MacOSXPbufferCGLDrawable)drawable).getOpenGLMode());
}
if (!impl.makeCurrent(contextHandle)) {
@@ -149,7 +147,7 @@ public class MacOSXPbufferCGLContext extends MacOSXCGLContext {
throw new GLException("Can't switch between using NSOpenGLPixelBuffer and CGLPBufferObj more than once");
}
destroyImpl();
- drawable.setOpenGLMode(mode);
+ ((MacOSXPbufferCGLDrawable)drawable).setOpenGLMode(mode);
openGLMode = mode;
haveSetOpenGLMode = true;
if (DEBUG) {