View Full Version : Two Dimensional Vertex Arrays

08-20-2008, 09:01 AM
I have two Simple questions:
I want to use GL_VERTEX_ARRAY to render my point clouds which are in form of hundrads of SCANLINES where each scanline contains thousands of points (in two dimentional STL vector).

1) Is there anyway we can use two dimensional arrays in GL_VERTEX_ARRAY?
If yes how would we manage glVertexPointer

2) Can we use STL vector in GL_VERTEX_ARRAY?


08-20-2008, 09:24 AM
1) Check glMultiDrawElements.
2) Of course .. NOT :) Each 1D STL array guarantees linear storage in memory, so, depending on how your point class/struct is, you *might* be able to pass the address of the first element of each sub-array as vertex data. Not the best way, but..