aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-20 21:53:26 +0200
committerSven Gothel <[email protected]>2014-09-20 21:53:26 +0200
commit38f6915fedb765313c1f4646acf9e13dfbccef36 (patch)
treed4930367a792070bdbe97db6f5e0f7f82f6dad12 /src/jogl/classes/com/jogamp/opengl
parentc4865ba2ef6c8ea02e1ca9eb4bfa836deb090d22 (diff)
Bug 1073: FBObject/GLFBODrawable: Remove deprecated methods
- dual-use reset(..), use dedicated init(..) and reset(..) - GLFBODrawable.FBOMODE_USE_DEPTH: Use GLCapabilities.[get|set]DepthBits(int) Note: Applications shall use _requested_ GLCapabilities, if passing caps down to the GLFBODrawable. Otherwise (using _chosen_ caps) we may end up in requesting properties not desired, e.g. stencil bits, if driver has chosen.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/FBObject.java59
1 files changed, 3 insertions, 56 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/FBObject.java b/src/jogl/classes/com/jogamp/opengl/FBObject.java
index 1e2d296f4..d16bed276 100644
--- a/src/jogl/classes/com/jogamp/opengl/FBObject.java
+++ b/src/jogl/classes/com/jogamp/opengl/FBObject.java
@@ -1090,61 +1090,10 @@ public class FBObject {
* @throws IllegalStateException if not initialized via {@link #init(GL, int, int, int)}.
* @throws GLException in case of an error, i.e. size too big, etc ..
*/
- public final boolean reset(final GL gl, final int newWidth, final int newHeight, final int newSamples) throws GLException, IllegalStateException {
+ public final boolean reset(final GL gl, int newWidth, int newHeight, int newSamples) throws GLException, IllegalStateException {
if( !initialized ) {
throw new IllegalStateException("FBO not initialized");
}
- return reset(gl, newWidth, newHeight, newSamples, true);
- }
-
- /**
- * Initializes or resets this FBO's instance.
- * <p>
- * In case the new parameters are compatible with the current ones
- * no action will be performed. Otherwise all attachments will be recreated
- * to match the new given parameters.
- * </p>
- *
- * <p>Leaves the FBO bound state untouched</p>
- *
- * @param gl the current GL context
- * @param newWidth
- * @param newHeight
- * @return {@code true} if this instance has been modified, otherwise {@code false}.
- * @throws GLException in case of an error
- * @deprecated Use {@link #init(GL, int, int, int)} or {@link #reset(GL, int, int, int)}
- */
- public final boolean reset(final GL gl, final int newWidth, final int newHeight) {
- return reset(gl, newWidth, newHeight, 0, false);
- }
-
- /**
- * Initializes or resets this FBO's instance.
- * <p>
- * In case the new parameters are compatible with the current ones
- * no action will be performed. Otherwise all attachments will be recreated
- * to match the new given parameters.
- * </p>
- *
- * <p>Leaves the FBO bound state untouched</p>
- *
- * @param gl the current GL context
- * @param newWidth the new width, it's minimum is capped to 1
- * @param newHeight the new height, it's minimum is capped to 1
- * @param newSamples if > 0, MSAA will be used, otherwise no multisampling. Will be capped to {@link #getMaxSamples()}.
- * @param resetSamplingSink <code>true</code> calls {@link #resetSamplingSink(GL)} immediatly.
- * <code>false</code> postpones resetting the sampling sink until {@link #use(GL, TextureAttachment)} or {@link #syncSamplingSink(GL)},
- * allowing to use the samples sink's FBO and texture until then. The latter is useful to benefit
- * from implicit double buffering while resetting the sink just before it's being used, eg. at swap-buffer.
- * @return {@code true} if this instance has been modified, otherwise {@code false}.
- * @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 boolean reset(final GL gl, int newWidth, int newHeight, int newSamples, final boolean resetSamplingSink) {
- if( !initialized ) {
- init(gl, newWidth, newHeight, newSamples);
- return true;
- }
newSamples = newSamples <= maxSamples ? newSamples : maxSamples; // clamp
@@ -1182,9 +1131,7 @@ public class FBObject {
samplingSinkDirty = true;
detachAllImpl(gl, true, true, sampleCountChange);
- if( resetSamplingSink ) {
- resetSamplingSink(gl);
- }
+ resetSamplingSink(gl);
if(!wasBound) {
unbind(gl);
@@ -2508,7 +2455,7 @@ public class FBObject {
* @throws GLException if this FBO doesn't use MSAA or the given sink uses MSAA itself
* @throws IllegalStateException if the {@code newSamplingSink} is not null and not initialized
*/
- public FBObject setSamplingSink(final FBObject newSamplingSink) throws /* IllegalStateException, */ GLException {
+ public FBObject setSamplingSink(final FBObject newSamplingSink) throws IllegalStateException, GLException {
final FBObject prev = samplingSink;
if( null == newSamplingSink) {
samplingSink = null;