aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-21 01:28:04 +0200
committerSven Gothel <[email protected]>2014-09-21 01:28:04 +0200
commit7749f0567fb592ee4b3f698bd2424a5687b02f47 (patch)
treebfee20e3c88f9efd42d6bf3b3727a3c5c3928fb0 /src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java
parent2194730c08c8bb55dc6985246dbedaeab5fd5828 (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/GLFBODrawableImpl.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLFBODrawableImpl.java4
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) {