summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-20 02:51:44 +0200
committerSven Gothel <[email protected]>2014-09-20 06:31:10 +0200
commit034d843359508833094b6a87eb4b58fd5231bafa (patch)
tree099b57d3a9a052c7393a72a4344b959e1e731c68 /src/jogl/classes/com/jogamp/opengl/util
parent577272e55c4f0d76854ee8f8a10f49796b5014f5 (diff)
FBObject: Simplify API (init/reset); Only issue automatic resetSamplingSink(..) if required; Fix resetSamplingSink(..), isBound(), ..
- Simplify API (init/reset) - use new unique methods for init and reset: - void init(final GL gl, final int newWidth, final int newHeight, final int newSamples) - does not issue resetSamplingSink(..) - boolean reset(final GL gl, final int newWidth, final int newHeight, final int newSamples) - always issues resetSamplingSink(..) - deprecated dual-use (init/reset): - boolean reset(final GL gl, final int newWidth, final int newHeight) - boolean reset(final GL gl, int newWidth, int newHeight, int newSamples, final boolean resetSamplingSink) - reset(..) no more creates a dummy 'samplingSink' instance if sampling > 0, left up to resetSamplingSink(..) - Track 'modified' state of FBObject, if size, format or any attachment has been changed since last - use(..) - syncSamplingSink(..) - resetSamplingSink(..) - Only issue resetSamplingSink(..) from syncSamplingSink(..)/use(..) if 'modified == true' +++ - Fix setSamplingSink(..), i.e. samplingSink state handling: - Validated whether given samplingSink is initialized, throws Exception if not. - Fix resetSamplingSink(..) - resets the bound state, i.e. leaves it untouched - also unbinds the samplingSink - sampleSinkDepthStencilMismatch() also returns true if this.depth/stencil == null, but samplingSink is not. - Newly created colorbuffer/-texture matches exiting colorbuffer's internal-format, if exists. - Using simplified resetSizeImpl(..) for size mismatch - Simplified samplingColorSink init check - Fix isBound() was: 'bound = bound && fbName != gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER)' fix: 'bound = bound && fbName == gl.getBoundFramebuffer(GL.GL_FRAMEBUFFER)' - Fix detachRenderbuffer(..) validates whether detachment was successful, similar to detachColorbuffer(..) Conflicts: src/jogl/classes/com/jogamp/opengl/FBObject.java
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/stereo/StereoClientRenderer.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/stereo/StereoClientRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/stereo/StereoClientRenderer.java
index 8bcce71a9..8b00aefb7 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/stereo/StereoClientRenderer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/stereo/StereoClientRenderer.java
@@ -87,7 +87,7 @@ public class StereoClientRenderer implements GLEventListener {
private void initFBOs(final GL gl, final DimensionImmutable size) {
for(int i=0; i<fbos.length; i++) {
- fbos[i].reset(gl, size.getWidth(), size.getHeight(), numSamples, false);
+ fbos[i].init(gl, size.getWidth(), size.getHeight(), numSamples);
if( i>0 && fbos[i-1].getNumSamples() != fbos[i].getNumSamples()) {
throw new InternalError("sample size mismatch: \n\t0: "+fbos[i-1]+"\n\t1: "+fbos[i]);
}
@@ -98,7 +98,7 @@ public class StereoClientRenderer implements GLEventListener {
fbos[i].attachRenderbuffer(gl, Type.DEPTH, 24);
final FBObject ssink = new FBObject();
{
- ssink.reset(gl, size.getWidth(), size.getHeight());
+ ssink.init(gl, size.getWidth(), size.getHeight(), 0);
ssink.attachTexture2D(gl, 0, false, magFilter, minFilter, GL.GL_CLAMP_TO_EDGE, GL.GL_CLAMP_TO_EDGE);
ssink.attachRenderbuffer(gl, Attachment.Type.DEPTH, 24);
}
@@ -118,7 +118,7 @@ public class StereoClientRenderer implements GLEventListener {
@SuppressWarnings("unused")
private void resetFBOs(final GL gl, final DimensionImmutable size) {
for(int i=0; i<fbos.length; i++) {
- fbos[i].reset(gl, size.getWidth(), size.getHeight(), numSamples, true);
+ fbos[i].reset(gl, size.getWidth(), size.getHeight(), numSamples);
if( i>0 && fbos[i-1].getNumSamples() != fbos[i].getNumSamples()) {
throw new InternalError("sample size mismatch: \n\t0: "+fbos[i-1]+"\n\t1: "+fbos[i]);
}