# VBO indices problem...

This topic is 3627 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi again, I'm having quite some struggle with VBO's, more precisly indexed VBOs. Could someone explain why this works...
                        for (int i=0; i < T->meshes[a]->indexCount; i++)
{
glTexCoord2fv(&T->meshes[a]->uvs.x);
glVertex3fv(&T->meshes[a]->vertices[T->meshes[a]->indices].x);
}


...while VBO's provides funky UV's? Vertices seem correct as the structure of the models are correct. I also tried to modify the loading, and that helps to some extent - but some areas of the model are still problematic:
                mesh->uvs = new var2<float>[mesh->uvCount];
var2<float> *uvs = new var2<float>[mesh->uvCount];

for (int i=0; i < mesh->indexCount; i++)
mesh->uvs[mesh->indices] = uvs;


Since the immediate mode rendering can be controlled to a higher extent, I suspect that my exporter is providing false uv-coords and that I "repair" these in code. But as VBO expect a more rigid structure, rendering gets messy. I'm getting both cross-eyed and grey-haired from this dilemma, and would be grateful for any tips. :) Thank you for your time! /Robert

##### Share on other sites
Do check what the values of UVs are, and make sure with glEnableClientState that the texcoord0 is enabled and properly bound.

1. 1
2. 2
3. 3
Rutin
19
4. 4
5. 5

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631780
• Total Posts
3002314
×