Vertex Arrays

Started by
1 comment, last by Keef 22 years, 3 months ago
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);
-----------------------Current Project: The Chromatic Game Engine
Advertisement

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);
-----------------------Current Project: The Chromatic Game Engine
You can try Display Lists.

PS: Where have you read about vertex arrays?

This topic is closed to new replies.

Advertisement