I've got many similar meshes (walls) in my scene graph (created one mesh, and added many IMeshSceneNodes)
Is it better to add all these meshes up into one Mesh using it's meshBuffers? If so, Why?
I would have to add each vertex of the mesh over and over again with the appropriate offsets, which seems like a huge waste of resources...
I would want to check for collisions against all these meshes - does having all of them integrated give a significant performance boost?
Why use meshBuffer?
Re: Why use meshBuffer?
Such class is already available.
Search for mesh combiner, progressive mesh buffer. There is a third one, but I forgot the name. I think these are available in irrExt.
Regards,
thanh
Search for mesh combiner, progressive mesh buffer. There is a third one, but I forgot the name. I think these are available in irrExt.
Regards,
thanh
Re: Why use meshBuffer?
If the questions is if it's better to have one mesh with many meshbuffers instead of many meshes with few meshbuffers, then yes - that's a lot faster.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Why use meshBuffer?
And having a single bigger meshbuffer is again faster than many meshbuffers. At least up to a certain amount. You have to weigh drawcalls vs. vertex count and so on. But since irrlicht only supports 16bit meshbuffers i think having a view big buffers is just fine. Then again if you do clever occlusion culling you can again get away with more meshes/scenenodes whatever since you are not drawing all of them at them same time.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.