Archived

This topic is now archived and is closed to further replies.

Keef

Vertex Arrays

Recommended Posts

Keef    122
I''ve been studying up on Vertex Arrays in an attempt to speed up my OpenGL, and I''ve come across an issue that needs advice. It seems to me that Vertex Arrays are only set up to cater for the case where a vertex is only ever associated with a single texture coordinate - ie when you set up a vertex array you also set up a texture coord array with a 1-1 correspondence between the elements of these two arrays. This works fine for , say, md2 models where each vertex of the model has a specific location on the corresponding texture map, but what about the case where you are trying to tile a texture across a mesh? I am working on a terrain engine where each triangle on the mesh needs a whole texture applied to it (to simulate rocks, grass etc). Due to the resolution needed, each triangle needs a whole 128x128 texture map applied to it. How can I do this with vertex arrays? In this model each vertex of the mesh is associated with different texture co-ordinates for each triangle. Is there any way to do this using vertex arrays? Cheers Keef ----------------------- glDisable(WORK); glEnable(GL_CODING);

Share this post


Link to post
Share on other sites
Keef    122

Nope.

Accodring to the FAQ what I want can only be achieved by duplicating the vertices for each triangle


Sorry for the RTFM post

-----------------------
glDisable(WORK);
glEnable(GL_CODING);

Share this post


Link to post
Share on other sites