Jump to content
  • Advertisement
Sign in to follow this  
himizu

Drawing List Vs. Object List

This topic is 4777 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 all, A mate and I are writing a game from scratch using Direct3D and I have come across a dilemma, My original thought for drawing objects to the screen was to have a linked list display list that the program went through when it came to render the scene. Items that were to be drawn would be added to the display list and after they were drawn the list would be cleared, but my mate suggested having a list of all the objects for that level and have it so that there is a general draw method that when it came to draw the scene it would go through the list and call the draw method of the class of each object. Thus rendering it to the scene with an "if" enclosed in the draw method of each class to prevent it from being drawn if it is not supposed to. So my question is this, which of these two methods would be the more efficient, fastest to run etc. Thanks very much in advance Himizu

Share this post


Link to post
Share on other sites
Advertisement
The two methods are likely to perform almost identically. However you may gain some performance by ordering the drawing so that you change texture (and other rendering parameters) the fewest number of times, and this seems to slightly favour the first method, although you will probably use several display lists.

Share this post


Link to post
Share on other sites
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!