Jump to content
  • Advertisement
Sign in to follow this  

VBO indices problem...

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

If you intended to correct an error in the post then please contact us.

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++)

...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];
                data.read((char *)(&uvs[0]), sizeof(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 this post

Link to post
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.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!