I’m trying to find a method to draw my geometry in a faster way. Currently, I draw all through several calls to glColor4f, glNormal4f, glVertex3f, … and so on. My
problem: I use multitexturing an i also call the function glMultiTexCoord2fARB. Has anyone an idea to draw my geometry faster? Another problem is that the texture u v coordinates can change :-/.
You can use multitexturing with vertex arrays by sending the pointers to the appropriate texture unit:
glInterleavedArrays(GL_N3F_V3F, 0, &vertArray);
glTexCoordPointer(2, GL_FLOAT, 0, &texArray);
glColorPointer(4, GL_FLOAT, 0, &colArray);
glTexCoordPointer(2, GL_FLOAT, 0, &texArray2);
The vertex pointer is always the same for both texture units, and I believe so is the color pointer. The texture coordinate pointer can be set on different addresses for each texture unit.
Hope that helped