Bug 1150

Summary: Fix GLContextImpl.createImpl(..) NoARBCreateContext and '!ARB GL >= 3.1' issues
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: enhancement CC: sgothel, todelbru
Priority: ---    
Version: 2.3.2   
Hardware: All   
OS: all   
Type: --- SCM Refs:
e0ed09f8e2df570a9542f606a133c8fde074cbfe 900f1f2a877aacfa750388419f05c0c13d6c5f26
Workaround: ---
Bug Depends on:    
Bug Blocks: 1105    

Description Sven Gothel 2015-03-26 14:48:00 CET
GLContextImpl.createImpl(..): Fix NoARBCreateContext and '!ARB GL >= 3.1' issues:
=================================================================================
GLContextImpl.createImpl(..) implementation of X11GLXContext and WindowsWGLContext
wrongly handles the case of NoARBCreateContext.
Here the !ARB created context shall allow GL >= 3.1,
since ARB context creation is disabled and 'no mix' can occur.

The latter was already intended due to failure criteris 'createContextARBTried'
in:
  if( glCaps.getGLProfile().isGL3() && createContextARBTried ) {
     failure("createImpl ctx !ARB but ARB is used, profile > GL2 requested");
  }

Further, WindowsWGLContext treats glCaps.isBitmap() 
within the 'createContextARBTried=true' case, but it shall never 
tried using the ARB context creation method.
This even lead to the issue of creating a 1.1 context,
but having the ProcAddressTable being still on the GL > 2 cached table.
This is due to 'setGLFunctionAvailability(..)'.

Make 'setGLFunctionAvailability(..)' functional
=================================================
We shall ensure, that states gathered via 'setGLFunctionAvailability(..)'
are reset in case the function fails.
Comment 1 Sven Gothel 2015-03-26 14:49:07 CET
Even though Bug 1105's root cause is a swing issue,
subsequently chosen Windows bitmap and !ARB context creation 
causes the '!ARB GL >= 3.1' failure.
Comment 2 Sven Gothel 2015-03-26 14:53:06 CET
*** Bug 1105 has been marked as a duplicate of this bug. ***
Comment 3 Sven Gothel 2015-03-26 16:31:16 CET
Make 'setGLFunctionAvailability(..)' functional
=================================================

Change to "Ensure 'setGLFunctionAvailability(..)' is functional",
i.e. that caller either throws an exception or issues a state reset.
Comment 4 Sven Gothel 2015-03-26 16:35:29 CET
e0ed09f8e2df570a9542f606a133c8fde074cbfe

    This fix solves the described issues below.
    
    Test cases added for onscreen and offscreen drawables,
    the latter includes Window's bitmap special case.
Comment 5 Sven Gothel 2015-03-27 03:10:19 CET
900f1f2a877aacfa750388419f05c0c13d6c5f26
  Fix unit tests: Use same definition as in GLProfile for 'disableOpenGLARBContext', i.e. exclude OSX