Advertisement Jump to content
Sign in to follow this  
ChristianFrantz

Merging meshes

This topic is 1769 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
Advertisement

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!