summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-20 07:20:35 +0200
committerSven Gothel <[email protected]>2014-09-20 07:20:35 +0200
commit55ccce090453954cf8975dcb1092b53f94b4839e (patch)
tree88ca9fb0d754296442ff8aa5610f8b68ac2302f2
parent4548c903c45ef39298e589a6070921e3e994d286 (diff)
FBObject: Fix merge issues of commit 034d843359508833094b6a87eb4b58fd5231bafa
- Handle deprecated reset(..) variants return type in a backward compatible manner
-rw-r--r--src/jogl/classes/com/jogamp/opengl/FBObject.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/FBObject.java b/src/jogl/classes/com/jogamp/opengl/FBObject.java
index 5db00356d..2d89b21c4 100644
--- a/src/jogl/classes/com/jogamp/opengl/FBObject.java
+++ b/src/jogl/classes/com/jogamp/opengl/FBObject.java
@@ -1093,7 +1093,7 @@ public class FBObject {
if( !initialized ) {
throw new IllegalStateException("FBO not initialized");
}
- return reset(gl, newWidth, newHeight, newSamples, true);
+ return resetImpl(gl, newWidth, newHeight, newSamples, true);
}
/**
@@ -1113,7 +1113,7 @@ public class FBObject {
* @deprecated Use {@link #init(GL, int, int, int)} or {@link #reset(GL, int, int, int)}
*/
public final void reset(final GL gl, final int newWidth, final int newHeight) {
- reset(gl, newWidth, newHeight, 0, false);
+ resetImpl(gl, newWidth, newHeight, 0, false);
}
/**
@@ -1138,10 +1138,14 @@ public class FBObject {
* @throws GLException in case of an error, i.e. size too big, etc ..
* @deprecated Use {@link #init(GL, int, int, int)} or {@link #reset(GL, int, int, int)}
*/
- public final void reset(final GL gl, int newWidth, int newHeight, int newSamples, final boolean resetSamplingSink) {
+ public final void reset(final GL gl, final int newWidth, final int newHeight, final int newSamples, final boolean resetSamplingSink) {
+ resetImpl(gl, newWidth, newHeight, newSamples, resetSamplingSink);
+ }
+
+ private final boolean resetImpl(final GL gl, int newWidth, int newHeight, int newSamples, final boolean resetSamplingSink) {
if( !initialized ) {
init(gl, newWidth, newHeight, newSamples);
- return;
+ return true;
}
newSamples = newSamples <= maxSamples ? newSamples : maxSamples; // clamp
@@ -1191,6 +1195,9 @@ public class FBObject {
if(DEBUG) {
System.err.println("FBObject.reset - END - wasBound, "+wasBound+", "+this);
}
+ return true;
+ } else {
+ return false;
}
}
@@ -2313,7 +2320,7 @@ public class FBObject {
if(DEBUG) {
System.err.println("FBObject.resetSamplingSink.X1: zero samples, mod "+modifiedInstance+"\n\tTHIS "+this);
}
- return modifiedInstance;
+ return; // modifiedInstance;
}
boolean modifiedInstance = false;
@@ -2354,7 +2361,7 @@ public class FBObject {
// all properties match ..
samplingSink.modified = false;
this.modified = false;
- return modifiedInstance;
+ return; // modifiedInstance;
}
}
@@ -2439,7 +2446,7 @@ public class FBObject {
"\n\t Matching: exFormat "+!sampleSinkExFormatMismatch+
", size "+!sampleSinkSizeMismatch +", depthStencil "+!sampleSinkDepthStencilMismatch);
}
- return modifiedInstance;
+ return; // modifiedInstance;
}
/**