diff options
author | Michael Bien <[email protected]> | 2010-06-10 14:28:03 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-06-10 14:28:03 +0200 |
commit | 2522d4f1ebffec030d7e8c3688e5f952c574c3d0 (patch) | |
tree | 81d631cb11dadc483a4615996dedf773eed083da /make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java | |
parent | 57d3d3f9f9475ae167cd9d33c9450eea66439fd2 (diff) | |
parent | 1d333a771ce0bc7c8594e21d031703f698f06a46 (diff) |
Merge branch 'master' of github.com:sgothel/jogl
Diffstat (limited to 'make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java')
-rw-r--r-- | make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java b/make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java index 4bc39b076..cb0d01312 100644 --- a/make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java +++ b/make/config/jogl/gl-impl-CustomJavaCode-gl2es12.java @@ -339,16 +339,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); ByteBuffer _res = (ByteBuffer) arbVBOCache.get(key); if (_res == null) { _res = newDirectByteBuffer(addr, sz); - InternalBufferUtil.nativeOrder(_res); + Buffers.nativeOrder(_res); arbVBOCache.put(key, _res); } _res.position(0); |