For my project, I need to load a few meshes fully textured dozens of times each (in different positions). I also need to make them visible/invisible interactively.
The problem is that the framerate starts being really low when the number of textures/polygons of all these meshes gets huge.
So, I have three questions:
- Is it possible to create a mesh reference in a different position/rotation? like, I load the mesh and its textures only once and then replicate it without need to waste memory
- Is there a better way to make these models appear/disappear other than setVisible()? I suspect the use of setVisible(false) does not improve the performance of the engine by actually discarding the polygons and textures of the models affected.
Thanks
Multiple instances of a mesh
-
hybrid
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Sorry, only two answers, but I couldn't see the third question
The meshes are reused, so no memory waste inside Irrlicht. However, the mesh is uploaded several times to the gfx card (only vertices, not texture) so you encounter the frame drop due to this additional communication.
Makeing all meshes invisible should bring the framerate back to the original value. If a node is not visible it is almost immediately skipped in the render phase.
The meshes are reused, so no memory waste inside Irrlicht. However, the mesh is uploaded several times to the gfx card (only vertices, not texture) so you encounter the frame drop due to this additional communication.
Makeing all meshes invisible should bring the framerate back to the original value. If a node is not visible it is almost immediately skipped in the render phase.