Jump to content
  • Advertisement
Sign in to follow this  
alop125125

Order in which primitives are drawn

This topic is 665 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 have been following directxtutorial.com and i am working on drawing multiple shapes at once and i can get it to work it is just that i dont understand why it works the first way and not the second

D3DXMatrixTranslation(&TranslationMatrix, 8.0f, 0.0f, 0.0f);   //draws a simple triangle or trianglelist
model.Triangle(d3ddev, vBuffer, Tcolor);
d3ddev->SetTransform(D3DTS_WORLD, &(TranslationMatrix));
model.draw(d3ddev);
 
 
D3DXMatrixTranslation(&TranslationMatrix, 0.0f, 0.0f, 0.0f);  //draws a simple quad or trianglestrip
model.Quad(d3ddev, vBuffer, Qcolor);
d3ddev->SetTransform(D3DTS_WORLD, &(TranslationMatrix));
model.draw(d3ddev);

this way works fine and all that the functions are exactly what you would except they just have a array of vertices and the draw one just uses d3dd3v->drawprimitve().

 
D3DXMatrixTranslation(&TranslationMatrix, 0.0f, 0.0f, 0.0f);  //draws a simple quad or trianglestrip
model.Quad(d3ddev, vBuffer, Qcolor);
d3ddev->SetTransform(D3DTS_WORLD, &(TranslationMatrix));
model.draw(d3ddev);D3DXMatrixTranslation(&TranslationMatrix, 8.0f, 0.0f, 0.0f);   //draws a simple triangle or trianglelist
model.Triangle(d3ddev, vBuffer, Tcolor);
d3ddev->SetTransform(D3DTS_WORLD, &(TranslationMatrix));
model.draw(d3ddev);

but this does not work and it glitches everywhere

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • 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!