Jump to content
  • Advertisement


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


Managing vertex and tex coord data in IB

This topic is 6379 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

Assume you would like to render a simple cube with different textures at each of its 6 faces. AN index buffer approach would be fine since it reduces the vertex data by factor 3. The VB format would be something like XYZ | TEX1. But this way I have to share the tex coord for each vertex - thats not what I want since one vertex has different tex coords for the three textures. I just found two ways to go, both with huge disadvantages: 1) dont use IB, just have the data in VB. This way I have to specify each vertex three times for the three different tex coords. What a waste! Surely not the way to go. 2) Use a Vertex Shader which defines that the vertex data comes from a first VB of format XYZ and that the tex coords data comes from a second VB of format TEX1. Now I can index them - but not independantly, so again I have to pass much more data than necessary. Do you know a better way? DX-Demo&3D code and docu avoid touching it, hopefully not for good reasons. Thank you for any help! - thomas

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!