PDA

View Full Version : How glVertexArray() uses stride



glorfindel
05-31-2002, 06:25 AM
I have my own vertex array format as follows vertex_t varray[2]={x1,y1,z1,r1,g1,b1,a1,x2,y2,z2,r2,g2,b2,a2};
Can a call to glVertexArray() be made that uses a stride=sizeof(vertex_t) and successfully pick out the x,y,z values? If it can, will OpenGL load the entire varray into memory and offset itself by stride while running, or will it load the x,y,z values into it's own memory space?

bakery2k
05-31-2002, 07:42 AM
That stride will work.
AFAIK, openGL will not load anything into its own address space, but access the array from its current position.

glorfindel
05-31-2002, 10:35 AM
Thanks for the help.

Omaha
05-31-2002, 02:50 PM
I think there's an nVidia (and probably others) extension where vertex arrays are stored local to the video subsystem, but normally they'll remain in your program's neighborhood until reading.

Display lists are always stored serverside though; but you lose the ability to change things on the fly.