PDA

View Full Version : Defining multiple vertex arrays



luc_pop
10-08-2003, 01:42 AM
hello,

Can you define in OpenGL multiple vertex arrays?

pseudocode:



glTranslated(<point1> );
glNormalPointers(,,normals);
//first array
glVertexPointer(,,,vertices);
glTranslated(<point2> );
glNormalPointers(,,normals);
//second array
glVertexPointer(,,,vertices);
//here i want a functioncall that
//access the first array and the second
//and draw triangles in between
glDraw<from first array to second>


I want to draw a cylinder between to points in space...
Thank you in advance...

satan
10-08-2003, 07:46 AM
You can't use the arrays like you want to do in your pseudocode. The arrays are used when you call the glDraw... function. So in your code the two translations are just added and only the last specified arrays are used for drawing.