Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- buffer.nextFrame();
- buffer.bind();
- glBindVertexArray(1);
- buffer.ensureSize(600 * 32);
- FloatBuffer mapped = buffer.map().asFloatBuffer();
- float[] toput = new float[600 * 8];
- for (int i = 0; i < 100; i++) {
- System.arraycopy(new float[]{-1, 1, 0, 1, 0, 1, 0, 0}, 0, toput, i * 48, 8);
- System.arraycopy(new float[]{1, 1, 0, 0, 1, 1, 1, 0}, 0, toput, i * 48 + 8, 8);
- System.arraycopy(new float[]{1, -1, 0, 1, 1, 0, 1, 1}, 0, toput, i * 48 + 16, 8);
- System.arraycopy(new float[]{-1, 1, 0, 1, 0, 1, 0, 0}, 0, toput, i * 48 + 24, 8);
- System.arraycopy(new float[]{1, -1, 0, 0, 1, 1, 1, 1}, 0, toput, i * 48 + 32, 8);
- System.arraycopy(new float[]{-1, -1, 0, 1, 1, 0, 0, 1}, 0, toput, i * 48 + 40, 8);
- }
- mapped.put(toput);
- buffer.unmap();
- drawBuffer(buffer);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement