JDK-6385054 : OGL: minor additions to OGLUtilities
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: generic
  • Submitted: 2006-02-13
  • Updated: 2008-02-06
  • Resolved: 2006-02-22
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.
6 b73Fixed
Related Reports
Relates :  
In 6309763 we added a new class called OGLUtilities that allows third-party libraries
such as JOGL to interact with the OpenGL-based Java 2D pipeline.  (This API is
completely unsupported but is a hopefully temporary measure until we can support
a public API in a future release.)

We need to add a couple new methods to the OGLUtilities class to make it more useful,
specifically so that JOGL can interact properly with the GL_EXT_framebuffer_object
support that we added to the OGL pipeline in Mustang.  This FBO support will signicantly
improve performance of applications that make use of JOGL's GLJPanel class.

EVALUATION The new methods look something like this: /** * Invokes the given Runnable on the OGL QueueFlusher thread with the * "shared" OpenGL context (corresponding to the given * GraphicsConfiguration object) made current. This method is typically * used when the Runnable needs a current context to complete its * operation, but does not require that the context be made current to * a particular surface. For example, an application may call this * method so that the given Runnable can query the OpenGL capabilities * of the given GraphicsConfiguration, without making a context current * to a dummy surface (or similar hacky techniques). * * In order to avoid deadlock, it is important that the given Runnable * does not attempt to acquire the AWT lock, as that will be handled * automatically as part of the <code>rq.flushAndInvokeNow()</code> step. * * @param config the GraphicsConfiguration object whose "shared" * context will be made current during this operation; if this value is * null or if OpenGL is not enabled for the GraphicsConfiguration, this * method will return false * @param r the action to be performed on the QFT; cannot be null * @return true if the operation completed successfully, or false if * there was any problem making the shared context current */ public static boolean invokeWithOGLSharedContextCurrent(GraphicsConfiguration config, Runnable r); /** * Returns one of the OGL-specific surface type constants (defined in * this class), which describes the surface associated with the given * Graphics object. * * @param g the Graphics object for the corresponding destination surface; * cannot be null * @return a constant that describes the surface associated with the * given Graphics object; if the given Graphics object is invalid (i.e. * is not associated with an OpenGL surface) this method will return * <code>OGLUtilities.UNDEFINED</code> */ public static int getOGLSurfaceType(Graphics g);