aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLContextImpl.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-08 10:47:41 +0200
committerSven Gothel <[email protected]>2014-07-08 10:47:41 +0200
commit96d530e7127c89db9991080e6268c6e8430d0619 (patch)
treeefd8da06fea9da34f03c232d8c23670e41282d11 /src/jogl/classes/jogamp/opengl/GLContextImpl.java
parentdb25b1ba6575210741e485838d0882a1590125e6 (diff)
Findbugs.not-written.null: Fix referencing non-written fields (never written or due branching)
- AWT TextRenderer: Add throw new InternalError("fontRenderContext never initialized!"); FIXME! - GLContextImpl.hasFBOImpl(): Fix serious NPE issue if extCache is null - GLDrawableFactoryImpl.createOffscreenDrawableImpl(..): - Fix NPE issue w/ null drawable - Fix resetting GammaRamp by ensuring originalGammaRamp will be set at 1st setGammaRamp(..) - AndroidGLMediaPlayerAPI14: Fix NPE: Use already resolved local referenced - EGLDrawableFactory: Fix NPE: Only operate on non null surface! - ALAudioSink.dequeueBuffer(..): Only resolve releasedBuffer elements if not null -
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index 5671334bd..832a797e2 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -177,7 +177,7 @@ public abstract class GLContextImpl extends GLContext {
glRendererLowerCase = glRenderer;
glVersion = glVendor;
- if (boundFBOTarget != null) { // <init>
+ if ( null != boundFBOTarget ) { // <init>: boundFBOTarget is not written yet
boundFBOTarget[0] = 0; // draw
boundFBOTarget[1] = 0; // read
}
@@ -1939,19 +1939,20 @@ public abstract class GLContextImpl extends GLContext {
}
private static final boolean hasFBOImpl(final int major, final int ctp, final ExtensionAvailabilityCache extCache) {
- return ( 0 != (ctp & CTX_PROFILE_ES) && major >= 2 ) || // ES >= 2.0
+ return ( 0 != (ctp & CTX_PROFILE_ES) && major >= 2 ) || // ES >= 2.0
- major >= 3 || // any >= 3.0 GL ctx (core, compat and ES)
+ major >= 3 || // any >= 3.0 GL ctx (core, compat and ES)
( null != extCache &&
+ (
+ extCache.isExtensionAvailable(GLExtensions.ARB_ES2_compatibility) || // ES 2.0 compatible
- extCache.isExtensionAvailable(GLExtensions.ARB_ES2_compatibility) || // ES 2.0 compatible
+ extCache.isExtensionAvailable(GLExtensions.ARB_framebuffer_object) || // ARB_framebuffer_object
- extCache.isExtensionAvailable(GLExtensions.ARB_framebuffer_object) || // ARB_framebuffer_object
+ extCache.isExtensionAvailable(GLExtensions.EXT_framebuffer_object) || // EXT_framebuffer_object
- extCache.isExtensionAvailable(GLExtensions.EXT_framebuffer_object) || // EXT_framebuffer_object
-
- extCache.isExtensionAvailable(GLExtensions.OES_framebuffer_object) ) ; // OES_framebuffer_object excluded
+ extCache.isExtensionAvailable(GLExtensions.OES_framebuffer_object) // OES_framebuffer_object
+ ) );
}
private final void removeCachedVersion(final int major, final int minor, int ctxProfileBits) {