Hey guys, I’m learning about Vertex Buffer Objects right now and I’m trying to get one of the book’s C examples to work. This is what I have and it’s not displaying anything for me on the screen.
During init:
IntBuffer buf = IntBuffer.allocate(1); {
gl.glGenBuffers(1, buf);
gl.glBindBuffer(GL.GL_ARRAY_BUFFER, buf.get(0));
}
FloatBuffer buffer = FloatBuffer.allocate(3); {
buffer.put(0, 0.0f);
buffer.put(1, 0.0f);
buffer.put(2, 0.0f);
}
gl.glBufferData(GL.GL_ARRAY_BUFFER, 32 * 3, buffer, GL.GL_STATIC_DRAW);
Rendering:
gl.glPointSize(3.0f);
gl.glDrawArrays(GL.GL_POINTS, 0, 1);
What am I missing here?