Jump to content
  • Advertisement

Archived

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

3DXD

Hmm. How to use one drawprimitive to draw several quads in different positions

This topic is 5277 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 was asking in other posts how to optimize better my rendering and one of things i suggested and was told was correct was to render all the quads that used the same texture at the same time. Now my only question is, if you have quads that are not connected and are in different places in the "world" what type of primitive do you tell the DrawPrimitive to use so that it won''t connect these together somehow. I assume what I want is possible. I just am too new to understand which is correct, or maybe its an entirely different function. Thanks again!

Share this post


Link to post
Share on other sites
Advertisement
Triangle lists aren''t naturally connected together. Triangle strips are.

Share this post


Link to post
Share on other sites
Duh me :-(, thanks once again. I just wanted to try to optimize one level of a dungeon as much as i can before really tackling all the other stuff like adding monsters etc.

Thanks!!

Share this post


Link to post
Share on other sites
easily done, have a dynamic index buffer,
then just fill the index buffer with what uses what textures in a row,
eg
SetTExture(....,texture1);
drawindexprimitive(trianglelist.......0,10);
SetTExture(....,texture2);
drawindexprimitive(trianglelist.......30,10);
SetTExture(....,texture3);
drawindexprimitive(trianglelist.......60,10);

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!