PDA

View Full Version : Problems with glVertexPointer



glFan
01-28-2002, 11:36 PM
Hi
I have a problem with the stride parameter
of glVertexPointer .
I have an array with my Vertex data and Texturecoord data (3 component float Vertex and 2 component float Texturecoord )
I think the stride param must be 8 in this case, but it doesnt run.

glFAn

Cem UZUNLAR
01-28-2002, 11:59 PM
If your vertex data layout is like that:
V V V T T V V V T T ....

then stride must be 5 * 8 = 40
Stride is the distance between first and second data start locations.

PH
01-29-2002, 12:37 AM
Stride should be 20,

3*sizeof(float) + 2*sizeof(float) = 20

glFan
01-29-2002, 05:24 AM
Hi

Thanks for your Help.
Its working now. (with stride 20)

glFAn