best way to draw over a million points

right now i’ve been doing it the slow way call glColor3f and glVertex3f for each point in a single call, but how to achieve fast performance coz right now my is dreadfull. is glDrawElements something or vertex arrays?.
I’m using a octree for culling unseen points.

cheers,

Paul

If it’s dynamic data, you should use VertexArrays, not VBOs.

Just put your colors and vertices into floatbuffers (and rewind them) upload them to the gfx-card using glVertexPointer/glColorPointer, and then call glDrawArrays.

glDrawElements is for indexed buffers, which you don’t need in this scenario.

Thanks,
Any links to tutorials, or code that demonstrate glVertex/color pointers.

The VertexArrayRange demo in the jogl-demos workspace shows how to use vertex arrays to draw huge numbers of triangles.