summaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-08-17 20:50:44 +0200
committerSven Gothel <[email protected]>2012-08-17 20:50:44 +0200
commitec0f4a5ab604c73d40d3585c0147b451ad53dcf5 (patch)
treec9890bcc644558380e981a793c5ec7bb4f0c2143 /src/jogl
parentfe78d5095ef98215ce6c73d8912dfa19ae708bd0 (diff)
GLDrawableFactory.createGLDrawable() offscreen: Fix caps - set double-buffer := false to be consistent w/ GLDrawableFactory.createOffscreenDrawable()
TestGLDrawable01NEWT: Enhance test case to run w/ EGLDrawableFactory (ES2) besides GL2 and GLX/WGL/..-Factory
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
index f7808294b..2f2bf5961 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
@@ -143,6 +143,7 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
// layered surface -> Offscreen/[FBO|PBuffer]
final GLCapabilities chosenCapsMod = (GLCapabilities) chosenCaps.cloneMutable();
chosenCapsMod.setOnscreen(false);
+ chosenCapsMod.setDoubleBuffered(false);
/* if( isFBOAvailable ) { // FIXME JAU: FBO n/a yet
chosenCapsMod.setFBO(true);
} else */
@@ -174,17 +175,21 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
result = createOnscreenDrawableImpl(target);
} else {
// offscreen
+ final GLCapabilitiesImmutable reqCaps = (GLCapabilitiesImmutable)config.getRequestedCapabilities();
if(DEBUG) {
- System.err.println("GLDrawableFactoryImpl.createGLDrawable -> OffScreenDrawable, FBO-chosen(-avail)/PBuffer: "+chosenCaps.isFBO()+"("+isFBOAvailable+")/"+chosenCaps.isPBuffer()+": "+target);
+ System.err.println("GLDrawableFactoryImpl.createGLDrawable -> OffScreenDrawable, FBO req / chosen - avail, PBuffer: "+reqCaps.isFBO()+" / "+chosenCaps.isFBO()+" - "+isFBOAvailable+", "+chosenCaps.isPBuffer()+": "+target);
}
if( ! ( target instanceof MutableSurface ) ) {
throw new IllegalArgumentException("Passed NativeSurface must implement SurfaceChangeable for offscreen: "+target);
}
- if( ((GLCapabilitiesImmutable)config.getRequestedCapabilities()).isFBO() && isFBOAvailable ) {
+ if( reqCaps.isFBO() && isFBOAvailable ) {
// FIXME JAU: Need to revise passed MutableSurface to work w/ FBO ..
final GLDrawableImpl dummyDrawable = createOnscreenDrawableImpl(target);
result = new GLFBODrawableImpl(this, dummyDrawable, target, target.getWidth(), target.getHeight(), 0 /* textureUnit */);
} else {
+ final GLCapabilities chosenCapsMod = (GLCapabilities) chosenCaps.cloneMutable();
+ chosenCapsMod.setDoubleBuffered(false);
+ config.setChosenCapabilities(chosenCapsMod);
result = createOffscreenDrawableImpl(target);
}
}