Jump to content
  • Advertisement
Sign in to follow this  
skwee

Vertex Buffer and game entities

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

Hello!

I'm doing some sort of high level abstraction for my game.
As I understood the common convention is to have so called game entities, which are simply objects in the scene (either renderable or not like triggers).
Now assuming I create a renderable entity with geometry, texture, material and etc. To render it I have to create vertex buffer for it and then bound the vertex buffer to the device (I'm talking here about DirectX9, but since it a general game question and not dx related i ask it in this forum).
Now I can have very large number of entities, should every renderable entity be created with its own vertex buffer? Should I reuse the vertex buffers somehow?

Sorry for stupid (maybe?) question and thanks a lot for help!

Share this post


Link to post
Share on other sites
Advertisement
Lots of your game entities are probably going to share the same models, so I would make the VB belong to the model, and then make GameEntities share models.
GameEntity points to a Model.
Model points to a Vertex buffer.

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!