Bug 867

Summary: OSX: Recognize OpenGL Core Profile > 3.0 (OSX 10.9 supports 4.1 core)
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: macosxAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: enhancement CC: johan, jrm, ralph
Priority: ---    
Version: 2   
Hardware: All   
OS: macosx   
Type: --- SCM Refs:
38025a602750161c72a50ad7a25e97fb7a6cb6df cbc641e89136098e0a9e79afe74b45203f828587 dc2deb071ca192594426791e95804a208e030ce3
Workaround: ---
Bug Depends on:    
Bug Blocks: 864, 930    

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.