Original Post
I have a texture that contains all the colors of the map. I haven't done much texturing before, but figured out that it shouldn't be that hard, and since I use indexed vertex arrays they should work the same.
Because I want some memory efficiency, I have only as many sets of indices as I have levels of detail(clod)
here is how I render a patch:
void Renderer::renderPatch(CLodPatch& patch, int offset) {
glVertexPointer(3, GL_FLOAT, sizeof(Vector3f), pTer->vertices + offset);
glTexCoordPointer(2, GL_FLOAT, 0, pTer->texture + offset);
//glColorPointer(3, GL_FLOAT, sizeof(Vector3f), pTer->colors + offset);
glDrawElements(GL_TRIANGLE_STRIP, pTer->numIndices[patch.curLod], GL_UNSIGNED_SHORT, pTer->indices[patch.curLod]);
fillgaps(patch.error);
}
Now as I read up, it occurs that I can't do this since the texture will only draw the texture taking place at the indices and the offset is somehow perverted. No, I don't want that. And I will not make as many indice arrays as I have patches.
Now is my only bet to transform the indice array or is there some extension that works the same way as vertex pointer? The way this works is pretty retarded.
[edited by - Captian Goatse on August 24, 2003 2:07:00 PM]