Jump to content
  • Advertisement
Sign in to follow this  
Freaker13

Geometry storage

This topic is 5144 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, My current 3d engine has a geometry class which contains primitivegroups. Each primitivegroup contains primitives(in my case triangles) with the same properties. Now my question: Is it better to store polygons instead of triangles in the primitivegroups? thx in advance

Share this post


Link to post
Share on other sites
Advertisement
If you want any speed then your geometry storage has to be continuous, i.e. an array of some kind. The reason for this is you do not want to be having one draw call per-triangle as your CPU will take far more time calling draw functions and having the driver send the tri to GPU than the GPU will spend processing the tri. If the geometry is in a continuous array then you only need one draw call per batch of tris that you're sending over and then while the CPU can get on with something else the GPU can be streaming the tris it has to process direct from memory.

Quote:
Is it better to store polygons instead of triangles in the primitivegroups?


AFAIK just about every consumer GPU works exclusively with tris, meaning if you submit something for drawing that isn't a tri it'll be converted into tris before processing anyway. So you want to have all your geomtry as tris in the first place so no time is wasted coverting it to tris.

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!