Advertisement Jump to content
Sign in to follow this  

Vertex Buffer and game entities

This topic is 3111 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'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
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, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!