Sign in to follow this  

Merging meshes

This topic is 1397 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 asking about this topic because I saw an old post where someone had used a technique to merge the meshes of cubes to reduce draw calls. I've never tried to merge meshes so I don't know how it works exactly.

If I have a vertex buffer for a cube, I can create a chunk and store the chunk into another big vertex buffer. But this doesn't reduce the number of triangles for each cube in the chunk. How would I take the chunk and create two giant trianlges for the side of the chunk?

Is this technique worth using if the cubes will be changing constantly? The initial loading of the chunks will be done at load time, but little changes can be done easily at render time

Share this post


Link to post
Share on other sites

Not sure what topic you refer to, but, in general, if you have several objects which use the same material or same texture, etc., you store all the vertices for the objects in a single vertex buffer and draw them all with a single DrawPrimitives (e.g.) call. The intent of that method is not necessarily to reduce the number of primitives drawn, just the number of calls.

 

With regard to "chunks," you'll have to explain what you mean by that.

 

With regard to constantly changing cubes, it depends on what's changing. If you're not changing the vertices themselves but just rotating, scaling or translating them, you can do that by setting a matrix.

Share this post


Link to post
Share on other sites

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