Jump to content
  • Advertisement


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


.obj woes.

This topic is 5435 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 everyone, I was reading through a .obj loader tutorial in order to attempt to make a .obj loader for my Direct3D app. When reading through it, I encountered a small problem. When I first read through it, I had planned to make a VB for all the vertices, go through them one by one and push them all into the VB. Then, I had planned to go through the face lines, and push the indices one by one. Then, all I''d have to do was switch to triangle list mode and send everything to the graphics card and let it do the work. However, I then noticed the vt (Vertext Texture) values, and realized that each of the vertices is being used more than once, but with different u and v values. So, sticking everything in a big VB & IB and letting it figure it out wouldn''t work. So, right now, I think I''ll make a big VB, and drop the IB, and go through the faces and push the correct vertices one by one, adding the correct u and v values as I go through. Then I''ll just give one DrawPrimitive call to draw it all. But, this would produce a much larger VB, and result in sending more data to the GPU. Is this the way it''s done? or am I missing something? Am I supposed to have several copies of the same vertex with only the vt values different, or is there some other way it''s done? Sirob Yes.» Footman, at large.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!