Bug 867 - OSX: Recognize OpenGL Core Profile > 3.0 (OSX 10.9 supports 4.1 core)
Summary: OSX: Recognize OpenGL Core Profile > 3.0 (OSX 10.9 supports 4.1 core)
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: macosx (show other bugs)
Version: 2
Hardware: All macosx
: --- enhancement
Assignee: Sven Gothel
URL:
: 864 869 (view as bug list)
Depends on:
Blocks: 864 930
  Show dependency treegraph
 
Reported: 2013-10-23 17:53 CEST by Sven Gothel
Modified: 2014-02-20 01:54 CET (History)
3 users (show)

See Also:
Type: ---
SCM Refs:
38025a602750161c72a50ad7a25e97fb7a6cb6df cbc641e89136098e0a9e79afe74b45203f828587 dc2deb071ca192594426791e95804a208e030ce3
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2013-10-23 17:53:16 CEST
Commit 34b35c5a0a379a6b4c0b23b9d347a0b1338f0239 allows maximum detected GL profile,
however MacOSXCGLContext.isGLProfileSupported(..) refuses to support GL > 3.

Allow support of OpenGL >= 3.1 including >= 4.0 for OSX.
Comment 1 Sven Gothel 2013-10-23 17:55:56 CEST
*** Bug 864 has been marked as a duplicate of this bug. ***
Comment 2 johan 2013-10-23 23:21:56 CEST
*** Bug 869 has been marked as a duplicate of this bug. ***
Comment 3 Sven Gothel 2013-10-24 23:38:05 CEST
Use new kCGLPFAOpenGLProfile values:
  kCGLOGLPVersion_GL3_Core (== old kCGLOGLPVersion_3_2_Core value)
  kCGLOGLPVersion_GL4_Core

+++

Besides recognizing OSX 10.9 ability to have core >= 4 available,
I experienced a quirk ..

New GLRenderer GL4NeedsGL3Request:
  OSX >= 10.9.0 - kCGLOGLPVersion_GL4_Core may not produce hw-accel context

here we have to use kCGLOGLPVersion_GL3_Core,
otherwise we will have APPLE's software renderer.

I got this one w/ the NV driver, but it may happen w/ other GPU/drivers as well.

+++
Comment 4 Sven Gothel 2013-10-24 23:44:51 CEST
38025a602750161c72a50ad7a25e97fb7a6cb6df: 
  Add GLRendererQuirks: Quirk GL4NeedsGL3Request and 'sticky device quirks'
Comment 5 Sven Gothel 2013-10-25 01:42:31 CEST
cbc641e89136098e0a9e79afe74b45203f828587
  Allow core >=4 if isMavericksOrLater; 

  Use [kCGLOGLPVersion_GL4_Core, kCGLOGLPVersion_GL3_Core] 
  for major==4 depending on sticky GLRendererQuirks.GL4NeedsGL3Request
Comment 6 Sven Gothel 2013-10-25 01:43:31 CEST
Trigger GLRendererQuirks.GL4NeedsGL3Request and make it sticky; Only alias profiles if HW-Accelerated!

    Only alias profiles if HW-Accelerated!
    GLContextImpl.mapGLVersions(..) shall not map a higher profile to a lower if it is a software renderer.
    
    +++
    
    GLContextImpl.mapGLVersions(..) attempts to trigger GLRendererQuirks.GL4NeedsGL3Request if OSX 10.9
    by creating a GL3 core context first.
    
    +++
    
    GLContextImpl.setGLFunctionAvailability():
      - On OSX 10.9: Detect GLRendererQuirks.GL4NeedsGL3Request and make it sticky (per device)
        while 'withinGLVersionsMapping'
    
      - Merge sticky quirks w/ local quirks
    
    +++
    
    TestGearsES2NEWT: Add cmdline '-gl2' to force GL2 profile.
Comment 7 Jim Miller 2014-02-20 00:51:03 CET
I downloaded the 2.1.4 jogl jar files. When running a sample program using them on linux, it reports OpenGL 4.3 as I would expect, but when running the exact program on my 10.9.1 Mac, it still reports OpenGL 2.1.  Is there something special that needs to be done to get OpenGL 4 (or even OpenGL 3.3) on Mac mavericks?
Comment 8 Jim Miller 2014-02-20 01:54:11 CET
Sorry - Just a silly mistake. I've got what I expect on Mac. Sorry for the unnecessary post.