<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1150</bug_id>
          
          <creation_ts>2015-03-26 14:48:00 +0100</creation_ts>
          <short_desc>Fix GLContextImpl.createImpl(..) NoARBCreateContext and &apos;!ARB GL &gt;= 3.1&apos; issues</short_desc>
          <delta_ts>2015-09-27 01:11:08 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>core</component>
          <version>2.3.2</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>1105</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>sgothel</cc>
    
    <cc>todelbru</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>e0ed09f8e2df570a9542f606a133c8fde074cbfe
900f1f2a877aacfa750388419f05c0c13d6c5f26</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4671</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-03-26 14:48:00 +0100</bug_when>
    <thetext>GLContextImpl.createImpl(..): Fix NoARBCreateContext and &apos;!ARB GL &gt;= 3.1&apos; issues:
=================================================================================
GLContextImpl.createImpl(..) implementation of X11GLXContext and WindowsWGLContext
wrongly handles the case of NoARBCreateContext.
Here the !ARB created context shall allow GL &gt;= 3.1,
since ARB context creation is disabled and &apos;no mix&apos; can occur.

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

Further, WindowsWGLContext treats glCaps.isBitmap() 
within the &apos;createContextARBTried=true&apos; 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 &gt; 2 cached table.
This is due to &apos;setGLFunctionAvailability(..)&apos;.

Make &apos;setGLFunctionAvailability(..)&apos; functional
=================================================
We shall ensure, that states gathered via &apos;setGLFunctionAvailability(..)&apos;
are reset in case the function fails.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4672</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-03-26 14:49:07 +0100</bug_when>
    <thetext>Even though Bug 1105&apos;s root cause is a swing issue,
subsequently chosen Windows bitmap and !ARB context creation 
causes the &apos;!ARB GL &gt;= 3.1&apos; failure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4674</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-03-26 14:53:06 +0100</bug_when>
    <thetext>*** Bug 1105 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4675</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-03-26 16:31:16 +0100</bug_when>
    <thetext>Make &apos;setGLFunctionAvailability(..)&apos; functional
=================================================

Change to &quot;Ensure &apos;setGLFunctionAvailability(..)&apos; is functional&quot;,
i.e. that caller either throws an exception or issues a state reset.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4676</commentid>
    <comment_count>4</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-03-26 16:35:29 +0100</bug_when>
    <thetext>e0ed09f8e2df570a9542f606a133c8fde074cbfe

    This fix solves the described issues below.
    
    Test cases added for onscreen and offscreen drawables,
    the latter includes Window&apos;s bitmap special case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4679</commentid>
    <comment_count>5</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-03-27 03:10:19 +0100</bug_when>
    <thetext>900f1f2a877aacfa750388419f05c0c13d6c5f26
  Fix unit tests: Use same definition as in GLProfile for &apos;disableOpenGLARBContext&apos;, i.e. exclude OSX</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>