diff options
Diffstat (limited to 'make/config/jogl/gl-impl-CustomJavaCode-gles3.java')
-rw-r--r-- | make/config/jogl/gl-impl-CustomJavaCode-gles3.java | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles3.java b/make/config/jogl/gl-impl-CustomJavaCode-gles3.java index 42adca4b1..a0e3c6570 100644 --- a/make/config/jogl/gl-impl-CustomJavaCode-gles3.java +++ b/make/config/jogl/gl-impl-CustomJavaCode-gles3.java @@ -1,15 +1,11 @@ +private final GLES3ProcAddressTable _pat; public GLES3Impl(GLProfile glp, GLContextImpl context) { this._context = context; - if(null != context) { - this.bufferObjectTracker = context.getBufferObjectTracker(); - this.bufferStateTracker = context.getBufferStateTracker(); - this.glStateTracker = context.getGLStateTracker(); - } else { - this.bufferObjectTracker = null; - this.bufferStateTracker = null; - this.glStateTracker = null; - } + this._pat = (GLES3ProcAddressTable)_context.getGLProcAddressTable(); + this.bufferObjectTracker = context.getBufferObjectTracker(); + this.bufferStateTracker = context.getBufferStateTracker(); + this.glStateTracker = context.getGLStateTracker(); this.glProfile = glp; this._isES3 = glp.getImplName() == GLProfile.GLES3; } @@ -354,7 +350,7 @@ public final void glDepthRange(double zNear, double zFar) { @Override public final void glBufferData(int target, long size, Buffer data, int usage) { - final long glProcAddress = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glBufferData; + final long glProcAddress = _pat._addressof_glBufferData; if ( 0 == glProcAddress ) { throw new GLException(String.format("Method \"%s\" not available", "glBufferData")); } @@ -365,7 +361,7 @@ public final void glBufferData(int target, long size, Buffer data, int usage) { @Override public boolean glUnmapBuffer(int target) { - final long glProcAddress = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glUnmapBuffer; + final long glProcAddress = _pat._addressof_glUnmapBuffer; if ( 0 == glProcAddress ) { throw new GLException(String.format("Method \"%s\" not available", "glUnmapBuffer")); } @@ -374,7 +370,7 @@ public boolean glUnmapBuffer(int target) { @Override public final GLBufferStorage mapBuffer(final int target, final int access) { - final long glProcAddress = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBuffer; + final long glProcAddress = _pat._addressof_glMapBuffer; if ( 0 == glProcAddress ) { throw new GLException("Method \"glMapBuffer\" not available"); } @@ -382,7 +378,7 @@ public final GLBufferStorage mapBuffer(final int target, final int access) { } @Override public final GLBufferStorage mapBufferRange(final int target, final long offset, final long length, final int access) { - final long glProcAddress = ((GLES3ProcAddressTable)_context.getGLProcAddressTable())._addressof_glMapBufferRange; + final long glProcAddress = _pat._addressof_glMapBufferRange; if ( 0 == glProcAddress ) { throw new GLException("Method \"glMapBufferRange\" not available"); } |