JDK-6236993 : OGL: simplify context creation at startup
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: generic
  • Submitted: 2005-03-07
  • Updated: 2008-02-06
  • Resolved: 2005-04-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b33Fixed
Related Reports
Relates :  
Relates :  
Description
The process of creating an OGLContext at startup could be simplified
significantly, especially now that the single-threaded rendering (STR)
project has been integrated.  In that project, all GL/GLX/WGL operations
are executed on the one queue-flushing thread (QFT), which the
exception of the creation of a GLX/WGLGraphicsConfig at startup.

The OGL pipeline would likely startup faster and be more reliable if
we created GLX/WGLGraphicsConfigs and their associated contexts on
the QFT.
###@###.### 2005-03-07 18:59:51 GMT

Comments
EVALUATION Part of this work was already completed in the quick PIT fix for 6236067, which ensured that WGLGraphicsConfigs are initialized on the QFT. The fix here is a more complete one that applies to both the GLX and WGL sides. Currently, the steps taken to initialize a GLXGraphicsConfig look something like this: - on the main thread (or EDT, or whatever) - GLXGraphicsConfig.getConfigInfo() (native method) - find an appropriate GLXFBConfig - create a temp context using the fbconfig - create a temp pbuffer using the fbconfig - make the context current to the pbuffer - check the GL version/extensions - destroy the temp context and pbuffer - later on the QFT - OGLContext_SetSurfaces - the shared context hasn't yet been created, do so now - create the context for the associated GLXGraphicsConfig - make the context current to the destination surface - ... This process is a bit convoluted (and also potentially dangerous since we're performing GL/GLX operations outside the "one true thread"). Now that we have the opportunity to perform this whole process on the QFT, it should simplify things: - on the QFT - GLXGraphicsConfig.getConfigInfo() (native method) - find an appropriate GLXFBConfig - the shared context hasn't yet been created, so create it now using that fbconfig - create the context (for this GLXGC) using the fbconfig - create a temp pbuffer using the fbconfig - make the context current to the pbuffer - check the GL version/extensions - destroy only the temp pbuffer - create an OGLContext that wraps the above GLXContext - save this context in the native GLXGraphicsConfig data - later on the QFT - OGLContext_SetSurfaces - the context has already been created, so fetch it from the GLXGraphicsConfigInfo associated with the dest surface - make the context current to the destination surface - ... Note that this process is very similar on the WGL side, so the same changes need to be made there as well. ###@###.### 2005-03-07 18:59:51 GMT
07-03-2005