diff options
author | Sven Gothel <[email protected]> | 2014-09-21 01:28:04 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-09-21 01:28:04 +0200 |
commit | 7749f0567fb592ee4b3f698bd2424a5687b02f47 (patch) | |
tree | bfee20e3c88f9efd42d6bf3b3727a3c5c3928fb0 /src/jogl/classes/jogamp/opengl | |
parent | 2194730c08c8bb55dc6985246dbedaeab5fd5828 (diff) |
Bug 1066: Reduce glGetError() in FBObject / GLFBODrawableImpl
- GLFBODrawableImpl
- cache getMaxRenderbufferSamples() result from initialize call,
method checks glGetError()
- FBObject
- init(..): Remove one redundant checkPreGLError()
- Allow reset(..) / modify-attachment-operations w/o glGetError():
- Only check error if DEBUG || GLContext.DEBUG_GL:
- RenderAttachment.initialize()
- TexureAttachment.initialize()
- syncSamplingSink(gl)
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java index 72caabdd0..991a351e6 100644 --- a/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java @@ -52,6 +52,7 @@ public class GLFBODrawableImpl extends GLDrawableImpl implements GLFBODrawable { private GLCapabilitiesImmutable origParentChosenCaps; private boolean initialized; + private int maxSamples; private int fboModeBits; private int texUnit; private int samples; @@ -180,7 +181,7 @@ public class GLFBODrawableImpl extends GLDrawableImpl implements GLFBODrawable { if(realize) { final GLCapabilities chosenFBOCaps = (GLCapabilities) getChosenGLCapabilities(); // cloned at setRealized(true) - final int maxSamples = gl.getMaxRenderbufferSamples(); + maxSamples = gl.getMaxRenderbufferSamples(); // if > 0 implies fullFBOSupport { final int newSamples = samples <= maxSamples ? samples : maxSamples; if(DEBUG) { @@ -292,7 +293,6 @@ public class GLFBODrawableImpl extends GLDrawableImpl implements GLFBODrawable { fboBound = false; // clear bound-flag immediatly, caused by contextMadeCurrent(..) - otherwise we would swap @ release fboSwapped = false; try { - final int maxSamples = gl.getMaxRenderbufferSamples(); newSamples = newSamples <= maxSamples ? newSamples : maxSamples; if(0==samples && 0<newSamples || 0<samples && 0==newSamples) { |