IosGL: reset buffer position in fromArray()

This commit is contained in:
Kirill Vainer 2015-04-25 12:45:30 -04:00
parent ca6b492cea
commit 389b117fb6

View File

@ -90,7 +90,9 @@ public class IosGL implements GL, GLExt {
if (buffer.remaining() < n) { if (buffer.remaining() < n) {
throw new BufferOverflowException(); throw new BufferOverflowException();
} }
int pos = buffer.position();
buffer.put(array, 0, n); buffer.put(array, 0, n);
buffer.position(pos);
} }
private static void checkLimit(Buffer buffer) { private static void checkLimit(Buffer buffer) {