aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-02 07:32:24 +0200
committerSven Gothel <[email protected]>2012-10-02 07:32:24 +0200
commit98d5ae6b31802235426f0f540f7d0df74884a3d3 (patch)
treeda6bd9cc445edcf72f895edf7ec632027efe701d /src/jogl/classes/jogamp
parent21b85e647f1e661c8e5e49caa91c564a3d041df2 (diff)
FBObject/GLFBODrawable: Debug / glError detection
- Enh. Debug output a bit - FBObject: Detect glError @ syncFramebuffer MSAA blit, throw GLException if glError to fail-fast - TODO: May add Mesa NoFBOMSAA Quirk to disable even trying it ..
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java
index 503b70af7..2620fb1c7 100644
--- a/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java
@@ -84,7 +84,13 @@ public class GLFBODrawableImpl extends GLDrawableImpl implements GLFBODrawable {
private final void initialize(boolean realize, GL gl) {
if(realize) {
final int maxSamples = gl.getMaxRenderbufferSamples();
- samples = samples <= maxSamples ? samples : maxSamples;
+ {
+ final int newSamples = samples <= maxSamples ? samples : maxSamples;
+ if(DEBUG) {
+ System.err.println("GLFBODrawableImpl.initialize(): samples "+samples+" -> "+newSamples+"/"+maxSamples);
+ }
+ samples = newSamples;
+ }
final GLCapabilitiesImmutable caps = (GLCapabilitiesImmutable) surface.getGraphicsConfiguration().getChosenCapabilities();
final int fbosN;
@@ -189,21 +195,21 @@ public class GLFBODrawableImpl extends GLDrawableImpl implements GLFBODrawable {
Throwable tGL = null;
ourContext.makeCurrent();
fboBound = false; // clear bound-flag immediatly, caused by contextMadeCurrent(..) - otherwise we would swap @ release
- try {
+ try {
final int maxSamples = gl.getMaxRenderbufferSamples();
newSamples = newSamples <= maxSamples ? newSamples : maxSamples;
if(0==samples && 0<newSamples || 0<samples && 0==newSamples) {
// MSAA on/off switch
if(DEBUG) {
- System.err.println("GLFBODrawableImpl.reset(): samples [on/off] reconfig: "+samples+" -> "+newSamples);
+ System.err.println("GLFBODrawableImpl.reset(): samples [on/off] reconfig: "+samples+" -> "+newSamples+"/"+maxSamples);
}
initialize(false, gl);
samples = newSamples;
initialize(true, gl);
} else {
if(DEBUG) {
- System.err.println("GLFBODrawableImpl.reset(): simple reconfig: "+samples+" -> "+newSamples);
+ System.err.println("GLFBODrawableImpl.reset(): simple reconfig: "+samples+" -> "+newSamples+"/"+maxSamples);
}
final int nWidth = getWidth();
final int nHeight = getHeight();