diff options
Diffstat (limited to 'make/config/jogl/gl-impl-CustomJavaCode-gles2.java')
-rwxr-xr-x | make/config/jogl/gl-impl-CustomJavaCode-gles2.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles2.java b/make/config/jogl/gl-impl-CustomJavaCode-gles2.java index bb8ddb7ef..e65c491a2 100755 --- a/make/config/jogl/gl-impl-CustomJavaCode-gles2.java +++ b/make/config/jogl/gl-impl-CustomJavaCode-gles2.java @@ -295,16 +295,19 @@ public java.nio.ByteBuffer glMapBuffer(int target, int access) { int sz = bufferSizeTracker.getBufferSize(bufferStateTracker, target, this); + if (0 == sz) { + return null; + } long addr; addr = dispatch_glMapBuffer(target, access, __addr_); - if (addr == 0 || sz == 0) { + if (0 == addr) { return null; } ARBVBOKey key = new ARBVBOKey(addr, sz); java.nio.ByteBuffer _res = (java.nio.ByteBuffer) arbVBOCache.get(key); if (_res == null) { _res = newDirectByteBuffer(addr, sz); - InternalBufferUtil.nativeOrder(_res); + Buffers.nativeOrder(_res); arbVBOCache.put(key, _res); } _res.position(0); |