diff options
author | Sven Gothel <[email protected]> | 2012-09-20 23:12:48 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-09-20 23:12:48 +0200 |
commit | 923d9dd7f1d40db72d35ca76a761ca14babf147f (patch) | |
tree | 754fdccc679898e9699cb76feeb54b97fcb2e605 /src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java | |
parent | 0f531ec116245b10fcb41e7b0905f240b91aa93a (diff) |
Add GLRendererQuirks; Fix shared EGL/ES resources;
Add GLRendererQuirks:
- Contains centralized 'tagged' workarounds for GL renderer bugs (quirks)
- Accessible via GLContext and GLDrawableFactory
- Initialized in GLContext.setAvailability*
-
Simplify GLGraphicsConfigurationUtil.fixOffscreenGLCapabilities(..) & use Quirks
- use quirks
- instead of passing booleans for each config, pass factory & device
Fix shared EGL/ES resources:
- GLProfile needs to initialize EGLDrawableFactory's shared resources before desktop,
so EGLDrawableFactory can use the fallback defaultDisplay & defaultSharedResource
for host mapped sharedResources (hack).
- If using defaultSharedResources for host mapped ones,
do not go through initialization cycles - simply map (sharedResource + context).
- EGLDrawableFactory: Use device's unique-key instead of connection only,
since the latter causes a collision (EGL-connection == X11-connection).
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java index 431706e24..ef2d3283d 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java @@ -45,7 +45,6 @@ import javax.media.opengl.DefaultGLCapabilitiesChooser; import javax.media.opengl.GLCapabilities; import javax.media.opengl.GLCapabilitiesChooser; import javax.media.opengl.GLCapabilitiesImmutable; -import javax.media.opengl.GLContext; import javax.media.opengl.GLDrawableFactory; import javax.media.opengl.GLException; import javax.media.opengl.GLProfile; @@ -213,9 +212,9 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF } X11GraphicsDevice x11Device = (X11GraphicsDevice) x11Screen.getDevice(); X11GLXDrawableFactory factory = (X11GLXDrawableFactory) GLDrawableFactory.getDesktopFactory(); - - capsChosen = GLGraphicsConfigurationUtil.fixGLCapabilities( capsChosen, GLContext.isFBOAvailable(x11Device, capsChosen.getGLProfile()), factory.canCreateGLPbuffer(x11Device) ); - boolean usePBuffer = !capsChosen.isOnscreen() && capsChosen.isPBuffer(); + + capsChosen = GLGraphicsConfigurationUtil.fixGLCapabilities( capsChosen, factory, x11Device); + final boolean usePBuffer = !capsChosen.isOnscreen() && capsChosen.isPBuffer(); X11GLXGraphicsConfiguration res = null; if( factory.isGLXVersionGreaterEqualOneThree(x11Device) ) { |