summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/macosx
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-07-17 00:59:45 +0200
committerSven Gothel <[email protected]>2013-07-17 00:59:45 +0200
commit78abc89be7f3935f26802cc0db33f61fc2c65de0 (patch)
tree72d34f224479ba5d63b8acecfbbbee799486c195 /src/jogl/classes/jogamp/opengl/macosx
parent55e480cd487e3089fae9b836eb213cd7c6b3d79a (diff)
Fix OSX GL-core lack of pbuffer: GLDrawableFactory.canCreateGLPbuffer(..) add GLProfile argument, similar to canCreateFBO(..)
In case a compatible non-core profile is requests, canCreateGLPbuffer(..) returns false on OSX.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/macosx')
-rw-r--r--src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java10
-rw-r--r--src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java9
2 files changed, 7 insertions, 12 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
index 9b163ae5b..6787ef500 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java
@@ -74,7 +74,6 @@ import com.jogamp.common.util.VersionNumber;
import com.jogamp.common.util.locks.RecursiveLock;
import com.jogamp.gluegen.runtime.ProcAddressTable;
import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver;
-import com.jogamp.opengl.GLExtensions;
import com.jogamp.opengl.GLRendererQuirks;
import com.jogamp.opengl.util.PMVMatrix;
import com.jogamp.opengl.util.glsl.ShaderCode;
@@ -465,15 +464,6 @@ public class MacOSXCGLContext extends GLContextImpl
return new StringBuilder();
}
- @Override
- public boolean isExtensionAvailable(String glExtensionName) {
- if (glExtensionName.equals(GLExtensions.ARB_pbuffer) ||
- glExtensionName.equals(GLExtensions.ARB_pixel_format)) {
- return true;
- }
- return super.isExtensionAvailable(glExtensionName);
- }
-
// Support for "mode switching" as described in MacOSXCGLDrawable
public void setOpenGLMode(GLBackendType mode) {
if (mode == openGLMode) {
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
index c9402b33d..83d656475 100644
--- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java
@@ -332,8 +332,13 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl {
}
@Override
- public boolean canCreateGLPbuffer(AbstractGraphicsDevice device) {
- return true;
+ public boolean canCreateGLPbuffer(AbstractGraphicsDevice device, GLProfile glp) {
+ if( glp.isGL2() ) {
+ // OSX only supports pbuffer w/ compatible, non-core, context.
+ return true;
+ } else {
+ return false;
+ }
}
@Override