summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java9
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java35
2 files changed, 17 insertions, 27 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
index 4f0b11789..068190cb2 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
@@ -323,15 +323,6 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
// GLDrawableFactoryImpl details
//
- protected void maybeDoSingleThreadedWorkaround(Runnable action) {
- if (Threading.isSingleThreaded() &&
- !Threading.isOpenGLThread()) {
- Threading.invokeOnOpenGLThread(action);
- } else {
- action.run();
- }
- }
-
/**
* Returns the sole GLDrawableFactoryImpl instance.
*
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
index 772dbbd00..5a1f997a6 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -436,33 +436,32 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
}
// PBuffer GLDrawable Creation
+ GLDrawableImpl pbufferDrawable;
final AbstractGraphicsDevice device = config.getScreen().getDevice();
+ /**
+ * Similar to ATI Bug https://bugzilla.mozilla.org/show_bug.cgi?id=486277,
+ * we need to have a context current on the same Display to create a PBuffer.
+ */
final SharedResource sr = (SharedResource) sharedResourceRunner.getOrCreateShared(device);
- if(null==sr) {
- throw new IllegalArgumentException("No shared resource for "+device);
- }
- final List<GLDrawableImpl> returnList = new ArrayList<GLDrawableImpl>();
- Runnable r = new Runnable() {
- public void run() {
- GLContext lastContext = GLContext.getCurrent();
- if (lastContext != null) {
+ if(null!=sr) {
+ GLContext lastContext = GLContext.getCurrent();
+ if (lastContext != null) {
lastContext.release();
- }
- sr.context.makeCurrent();
- try {
- GLDrawableImpl pbufferDrawable = new WindowsPbufferWGLDrawable(WindowsWGLDrawableFactory.this, target);
- returnList.add(pbufferDrawable);
- } finally {
+ }
+ sr.context.makeCurrent();
+ try {
+ pbufferDrawable = new WindowsPbufferWGLDrawable(WindowsWGLDrawableFactory.this, target);
+ } finally {
sr.context.release();
if (lastContext != null) {
lastContext.makeCurrent();
}
- }
}
- };
- maybeDoSingleThreadedWorkaround(r);
- return returnList.get(0);
+ } else {
+ pbufferDrawable = new WindowsPbufferWGLDrawable(WindowsWGLDrawableFactory.this, target);
+ }
+ return pbufferDrawable;
}
/**