Building a B3D mesh?

Blitz3D Forums/Blitz3D Programming/Building a B3D mesh?

Diwanya(Posted 2015) [#1]
Hi guys can someone help me out here, I need to be able to load meshes on run time when walking to a new area, however using the LoadMesh command will halt the entire program until it is finished so is there a way I can build the b3d mesh in run time without it halting?


RemiD(Posted 2015) [#2]
If the meshes are static (no joints, no influences of some joints over some vertices) you can create your own routines to create/save then delete then load/create your own meshes/textures.
Search in the code archives there are some examples.


Bobysait(Posted 2015) [#3]
You can use the fastpointer library from MikhaelV and creates a thread to load your mesh (whith LoadMesh or LoadAnimMesh). Once the thread ends, you can use the mesh that was loaded multi-threaded without halting the main loop.

Just be carefull with threads (it's some explosive stuff for the best, but in most case for the worst ^_^) for simple things like loading medias in background, it's worth it and is easy enough to maintain. (for complex stuff, you should never use thread unless you're very familiar with them)