From 96d530e7127c89db9991080e6268c6e8430d0619 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 8 Jul 2014 10:47:41 +0200 Subject: 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 - --- src/jogl/classes/jogamp/opengl/GLContextImpl.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java') 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) { // + if ( null != boundFBOTarget ) { // : 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) { -- cgit v1.2.3