Sign in to follow this  

Geometry storage

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

This topic is 4862 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this