aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
diff options
context:
space:
mode:
Diffstat (limited to 'make/config/jogl/gl-impl-CustomJavaCode-gles1.java')
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-gles1.java18
1 files changed, 12 insertions, 6 deletions
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
index 9b0d98fe9..dff33cf81 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
@@ -1,8 +1,14 @@
public GLES1Impl(GLProfile glp, GLContextImpl context) {
this._context = context;
- this.bufferSizeTracker = context.getBufferSizeTracker();
- this.bufferStateTracker = context.getBufferStateTracker();
- this.glStateTracker = context.getGLStateTracker();
+ if(null != context) {
+ this.bufferSizeTracker = context.getBufferSizeTracker();
+ this.bufferStateTracker = context.getBufferStateTracker();
+ this.glStateTracker = context.getGLStateTracker();
+ } else {
+ this.bufferSizeTracker = null;
+ this.bufferStateTracker = null;
+ this.glStateTracker = null;
+ }
this.glProfile = glp;
}
@@ -106,9 +112,9 @@ public final GL2GL3 getGL2GL3() throws GLException {
// Helpers for ensuring the correct amount of texture data
//
-private GLBufferSizeTracker bufferSizeTracker;
-private GLBufferStateTracker bufferStateTracker;
-private GLStateTracker glStateTracker;
+private final GLBufferSizeTracker bufferSizeTracker;
+private final GLBufferStateTracker bufferStateTracker;
+private final GLStateTracker glStateTracker;
private boolean bufferObjectExtensionsInitialized = false;
private boolean haveOESFramebufferObject;