Jump to content
  • Advertisement


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


Directx Api, object handling optomisation

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

Theory question that focuses on how the directx API does things and efficiency concerns Lets say you''ve got 100 spaceships. Now if you create 100 ships, that will mean 100 objects containing 100 sets of textures and 100 sets of meshes, all of them being identical probably (maybe a few variations on the types of ships). I think I can make a work around that a ship will subclass my d3dMesh class such that only one copy of the texture and mesh is stored (using directx vertex buffers etc, pretty much straight out of the dx sdk). Now the question is this: will I take a huge cpu/gpu hit for asking the processor(s) to move that 1 copy of the mesh and texture to 100 different locations per frame? Or is this the standard sort of work that the api does anyway, or would I be better off with 100 unique copies of the space ship in the game eating that memory up?

Share this post

Link to post
Share on other sites
If it was me I would make them all seperate objects. Especially if they each need to be able to face different directions at different times.
I made a program that put 1,000 animated sprites that bounced around the screen WITHOUT any slowdown. In other words: Your computer can handle it!

--Lowell N. Manners

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!