aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.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/GLDrawableFactoryImpl.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/GLDrawableFactoryImpl.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
index fd8052b96..1aca29d0a 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
@@ -272,11 +272,14 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
final GLCapabilitiesImmutable capsChosen = GLGraphicsConfigurationUtil.fixGLPBufferGLCapabilities(capsRequested);
final GLDrawableImpl drawable = createOffscreenDrawableImpl( createMutableSurfaceImpl(device, true, capsChosen, capsRequested, chooser,
new UpstreamSurfaceHookMutableSize(width, height) ) );
+ final GLContextImpl ctx;
if(null != drawable) {
drawable.setRealized(true);
+ ctx = (GLContextImpl) drawable.createContext(shareWith);
+ } else {
+ ctx = null;
}
-
- return new GLPbufferImpl( drawable, (GLContextImpl) drawable.createContext(shareWith) );
+ return new GLPbufferImpl( drawable, ctx);
}
//---------------------------------------------------------------------------
@@ -607,7 +610,10 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
rampEntry = 0.0f;
gammaRamp[i] = rampEntry;
}
- needsGammaRampReset = true;
+ if( !needsGammaRampReset ) {
+ originalGammaRamp = getGammaRamp();
+ needsGammaRampReset = true;
+ }
return setGammaRamp(gammaRamp);
}