diff options
Diffstat (limited to 'make/config/jogl/gl-impl-CustomJavaCode-gles1.java')
-rwxr-xr-x | make/config/jogl/gl-impl-CustomJavaCode-gles1.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java index b4efac8a1..d29fe1645 100755 --- a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java +++ b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java @@ -285,16 +285,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); |