PDA

View Full Version : Vertex arrays and multitexturing.



lgc_ustc
02-16-2004, 05:05 PM
Hi, all,

I am currently developing an outdoor terrain system, and I am trying to improve the performance. I know the vertex array can reduce the number of function calls thus improving the performance. However, my program uses multitexturing(glMultiTexCoord2fARB) to add details to the terrain. I wonder if I can still use vertex arrays to while maintaining multitexuring, since the redbook just gives vertex array examples of normal texture-mapping.

Thanks for any response.

jwatte
02-16-2004, 08:12 PM
You should download the OpenGL 1.5 specification, which is available as a PDF file on the front page of this web site.

It explains that since version 1.2.1(?) (and previously, in the multitexture extension) you can use glClientActiveTexture() to set which texture coordinate set to specify before you call glTexCoordPointer(). Set first one, then the other, before calling glDrawRangeElements(), and you'll be all fine.