Building a mesh from scratch
Blitz3D Forums/Blitz3D Programming/Building a mesh from scratch
| ||
Hi I need to completely rebuild a mesh every frame. This mesh can have several surfaces because I'm stuffing a certain amount of tris into each surface. The number of surfaces can go up or down so - as there's no FreeSurface() command - I'm simply freeing the old mesh and then CreateMesh'ing a new one. Is this likely to cause any problems, like mem fragmenting, do you think? I quess I could always clear all the surfaces and rebuild that way but my current method makes things much simpler. :) |
| ||
Have a look at this topic over at BlitzCoder: http://www.blitzcoder.com/cgi-bin/ubb-cgi/postdisplay.cgi?forum=Forum14&topic=000868 There's some stuff in there from Anthony Flack about his Cletus game where I believe he's doing what you've just suggested. EDIT: Just skimmed through it and he's using the ClearSurface() command, which maybe what you were looking for with FreeSurface()? Cheers, Ryan |
| ||
The trouble with ClearSurface is that it just blanks the surface, it doesn't actually remove it. So I may need, say 5 surfaces at one point and then later go back to only needing 1, but I have no way of removing the unused surfaces. I guess it's not really a big deal since they're empty anyway - it's just that managing the surfaces is a bit of a pain. Think I'll just stick to rebuilding everything from scratch. It's only for a debuging function, anyway. :) Cheers! |