The old surfaces problem

Blitz3D Forums/Blitz3D Programming/The old surfaces problem

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.

But clearing and rebuilding a mesh takes a lot of processing power. Set up the mesh during initialisation and position the verts of those not needed in any one frame outside the clipping range of the camera. If you have a particular location for hidden verts, it's easy then to check if they're in use or not when you need a new one. They'll still render, but it's still quicker than creating a new mesh every frame.

Think of it like Dimming an Array. You create the 1000 (or however many) items at startup, then use them as needed, then ignore/put away once not needed.

Or, to be poncey, think of it like actors in a stage play. They're all hired before the show opens. When the character walks offstage, the producers don't shoot him and then quickly hire a new actor just before the character's next scene - they just hide him in the green room. Better for everyone :)