Archived

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

helix

Creating vertex buffers procedurally

Recommended Posts

helix    301
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
helix    301
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
Ivko    203
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