• Advertisement

Archived

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

Creating vertex buffers procedurally

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

My brain is imploding. I''ve been trying to procedurally create a triangle strip for a fairly simple object but I just can''t wrap my brain around it. Say for the following image:
  
          0____1
          /   /|
         /   / |
       2/___/3 |
     8__|   |  |___9
     / 4|   |  |5 /|
  12/   |   | /  / /13
   /   6|___|/7 / /
10/__________11/ /
  |____________|/
 14             15
  
(whew! ascii art is evil!) Let''s number the vertices as shown. What order would I add the vertices to my vertex buffer? I can take it as far as around the following before I get too confused and have a brain fart. 203175... etc lol help!

Share this post


Link to post
Share on other sites
Advertisement
ahh...that would explain why I kept getting lost. I think I''m just going to use some ID3DXMesh functions instead...

Share this post


Link to post
Share on other sites
You''re not going to be able to construct that object as one set of triangle strips. You have to group the different parts of it and draw them seperately. In this case, you would draw the base, then draw the thing sticking up out of it.

Share this post


Link to post
Share on other sites

  • Advertisement