Shortbuffer

shortbuffer.png
 public static ShortBuffer makeShortBuffer(short[] mIndices2, int _length) {
        ByteBuffer bb = ByteBuffer.allocateDirect(_length * 2);
        bb.order(ByteOrder.nativeOrder());
        ShortBuffer sb = bb.asShortBuffer();
        sb.put(mIndices2, 0, _length);
        sb.position(0);
        return sb;
    }

java opengl-es-2

サポートサイト Wikidot.com javaopengl-es-2