aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/sun/opengl/impl/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/macosx')
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java20
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java4
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java4
3 files changed, 16 insertions, 12 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java
index 111b215e3..ef3e9f930 100644
--- a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLContext.java
@@ -48,7 +48,6 @@ import com.sun.gluegen.runtime.ProcAddressTable;
public abstract class MacOSXCGLContext extends GLContextImpl
{
- protected MacOSXCGLDrawable drawable;
protected long nsContext; // NSOpenGLContext
protected long cglContext; // CGLContextObj
private CGLExt cglExt;
@@ -56,13 +55,16 @@ public abstract class MacOSXCGLContext extends GLContextImpl
// CGL extension functions.
private CGLExtProcAddressTable cglExtProcAddressTable;
- public MacOSXCGLContext(MacOSXCGLDrawable drawable,
- GLContext shareWith)
- {
- super(drawable.getGLProfile(), shareWith);
- this.drawable = drawable;
+ public MacOSXCGLContext(GLDrawableImpl drawable, GLDrawableImpl drawableRead,
+ GLContext shareWith) {
+ super(drawable, drawableRead, shareWith);
}
-
+
+ public MacOSXCGLContext(GLDrawableImpl drawable,
+ GLContext shareWith) {
+ this(drawable, null, shareWith);
+ }
+
public Object getPlatformGLExtensions() {
return getCGLExt();
}
@@ -82,10 +84,6 @@ public abstract class MacOSXCGLContext extends GLContextImpl
return cglExtProcAddressTable;
}
- public GLDrawable getGLDrawable() {
- return drawable;
- }
-
protected String mapToRealGLFunctionName(String glFunctionName)
{
return glFunctionName;
diff --git a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
index 2aefa7b5b..f398ed8a0 100644
--- a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
+++ b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java
@@ -74,6 +74,8 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl implements D
int width,
int height) {
AbstractGraphicsScreen aScreen = DefaultGraphicsScreen.createDefault();
+ capabilities.setOnscreen(false);
+ capabilities.setPBuffer(false);
return new MacOSXOffscreenCGLDrawable(this, aScreen, capabilities, chooser, width, height);
}
@@ -86,6 +88,8 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl implements D
final int initialWidth,
final int initialHeight) {
AbstractGraphicsScreen screen = DefaultGraphicsScreen.createDefault();
+ capabilities.setOnscreen(false);
+ capabilities.setPBuffer(true);
return new MacOSXPbufferCGLDrawable(this, screen, capabilities, chooser,
initialWidth, initialHeight);
}
diff --git a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
index bb0984e58..9b6d8267d 100644
--- a/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
+++ b/src/jogl/classes/com/sun/opengl/impl/macosx/cgl/MacOSXPbufferCGLDrawable.java
@@ -88,7 +88,9 @@ public class MacOSXPbufferCGLDrawable extends MacOSXCGLDrawable {
}
protected void swapBuffersImpl() {
- // FIXME: do we need to do anything if the pbuffer is double-buffered?
+ if(DEBUG) {
+ System.err.println("unhandled swapBuffersImpl() called for: "+this);
+ }
}
private void createPbuffer() {