Before you render you need to call glEnableClientState(GL_VERTEX_ARRAY)
and glEnableClientState(GL_COLOR_ARRAY)
. You should also disable them after rendering.
Also, you are recreating your VBOs in each render pass currently, which is usually not a good idea. If you are rendering a static scene you only need to create them once and if you need to update your scene you should use glBufferSubData
or glMapBuffer
to update only the parts which need to be changed, along with Gl_STREAM_DRAW
instead of GL_STATIC_DRAW
as the usage hint.
Aswell, I dont know why you are using Float.intBitsToFloat(Float.floatToIntBits(f));
or creating a float array when you could put your floats directly into the buffer.