Why is this code so slow

Blitz3D Forums/Blitz3D Programming/Why is this code so slow

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

As willy said, adjusting a mesh on the fly can be slow, and moving one vertex forces the entire mesh to be reuploaded to the card.

I don't know how Blitz's bone system works, but it seems likely to me that most characters will have more than 1024 vertcies in them. That being the case, and it being the case that thouands of Blitz users have not cried out in pain at bone animated meshes being too slow to do anyhting with, it may be that animating vertcies with bones is faster than animating them manually. This could be because the 3D card controls the vertex movement in the case of a bone. Or it could be that Blitz optimizes the mesh uploading for bones.

But it's an avenue to explore at least. If you produce a mesh in your 3d program and attach bones to it and load it as a B3D file you might be able to animate water then by moving the bones instead of the vertcies and gain some speed.

Maybe.