private void fromArray(int n, int[] array, IntBuffer buffer) {
        if (buffer.remaining() < n) { 
            throw new BufferOverflowException();
        }
        int pos = buffer.position();
        buffer.put(array, 0, n);
        buffer.position(pos);
    }
Implements OpenGL ES 2.0 and 3.0 for iOS. 

@author Kirill Vainer, Jesus Oliver
jme3-ios/src/main/java/com/jme3/renderer/ios/IosGL.java