summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/awt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-04-13 21:24:44 +0200
committerSven Gothel <[email protected]>2010-04-13 21:24:44 +0200
commit2df3bea10859ee2f2c4b3622f3b610b17a5749d6 (patch)
tree9bb948241aef06fdaf1dd4d09f1b31989c76f858 /src/jogl/classes/javax/media/opengl/awt
parent1c1053c6a8b669c067ae1316b9770871e213ea05 (diff)
ATI (fglrx) PBuffer/X11Display bug workaround/cleanup
- See https://bugzilla.mozilla.org/show_bug.cgi?id=486277 - Description: - To use PBuffer, a context must be current - X11Display cannot be switched while using the PBuffer [within one thread]. Hence we shall try harder to reuse _the_ user configured X11Display - whenever possible. This is actually a good thing, ie cleanup up our code again. - Changes to workaround/cleanup: - GLDrawableFactory* methods 'canCreate*()' are changed to 'canCreate*(AbstractGraphicsDevice)' to allow pipelining the X11Display. This reduces the overhead of using a local TLS X11Display. - WindowsDummyWGLDrawable cstr gets the GLProfile as a parameter now, this is done while adding X11DummyGLXDrawable - forseeing the usecase to query available GLProfiles at startup. - X11DummyGLXDrawable added, following the WindowsDummyWGLDrawable path to have a dummy GLContext current to fix the ATI bug. NativeWindow X11: - Add XIOErrorHandler to identify the fatal failure of closing a Display (-> ATI bug). Build: - Adding ant.jar and ant-junit.jar to the junit compile/run classpath - Misc: - Fix: CreateDummyWindow(..) returns a HWND, not a HDC - mapToRealGLFunctionName: Added mapping for X11/GLX. - X11GLXGraphicsConfigurationFactory: Uncommented dead code 'createDefaultGraphicsConfigurationFBConfig' Tests: Passed (Linux64bit: NVidia/ATI) Todo: More tests on ATI, especially multithreading/X11Display usage.
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/awt')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index 43b2e1e1d..e8de00629 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -494,7 +494,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable {
backend = new J2DOGLBackend();
} else {
if (!hardwareAccelerationDisabled &&
- factory.canCreateGLPbuffer()) {
+ factory.canCreateGLPbuffer(null)) {
backend = new PbufferBackend();
} else {
if (softwareRenderingDisabled) {
@@ -1509,7 +1509,8 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable {
}
}
if (joglContext == null) {
- if (factory.canCreateExternalGLDrawable()) {
+ AbstractGraphicsDevice device = j2dContext.getGLDrawable().getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice();
+ if (factory.canCreateExternalGLDrawable(device)) {
joglDrawable = factory.createExternalGLDrawable();
// FIXME: Need to share with j2d context, due to FBO resource ..
// - ORIG: joglContext = joglDrawable.createContext(shareWith);
@@ -1518,7 +1519,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable {
System.err.println("-- Created External Drawable: "+joglDrawable);
System.err.println("-- Created Context: "+joglContext);
}
- } else if (factory.canCreateContextOnJava2DSurface()) {
+ } else if (factory.canCreateContextOnJava2DSurface(device)) {
// Mac OS X code path
// FIXME: Need to share with j2d context, due to FBO resource ..
// - ORIG: joglContext = factory.createContextOnJava2DSurface(g, shareWith);