Jump to content
  • Advertisement


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


Rendering faces

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

I''m loading and rendering ASE files, the only problem is that there are more texture coordinates than there are vertices listed in the mesh definition. there are as many texture coordinates as there are faces...so im trying to set up a class to encapsulate all that..the only problem is, that i cant directly match up all the vertices with texture coordinates unless i increase the number of vertices...which is something i dont want to do. Is there anyway around this? Any ideas on how dynamically change what texture coordinates belong to a vertex? Thanks for the help

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
There might be more texture coordinates then there are verticies because a the texture on two faces might not meet at the same place on the vertexe. In other words two neigboring faces might not share neighboring texture coordinates.

When you set up your vertex buffer you are going to have to use something like:

D3DVECTOR p; //xyz
D3DVECTOR n; //the normal
float u0, v0; //the texture coords

for every vertex. so you might as well read the data in to something like that anyway.

You cant really use seperate arrays for each attribute unless you want to mess with writing your own vertex shader, which I wouldn''t advise for this situation.

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!