I have been working with volumetric smoke (which I have been simulating with meshes, etc.) as opposed to sprite-based smoke. MiniB3D has been a dream, but too many smoke trails quickly bring my system to a crawl (and I have a Core Duo system with a decent Vcard). I implemented an array to recycle particle declarations/memory, and got a little bit of a boost. I quickly decided that a much better method of creating meshed smoke would be, instead of creating 150 different copies of the same mesh (which is what I was doing before with lists of meshes), I should load the mesh only once, and then draw it to the backbuffer at multiple places. That way I would only need to store one mesh and then use an array, map, etc. to store positions and orientations where that image would be copied. Unfortunately, miniB3D does not directly allow this kind of operation.
Based on my reading of the miniB3D code, the TCamera.Update method clears the backbuffer for the next draw. So any attempt to draw a single mesh multiple times from outside code would be lost as soon as Renderworld is called. The best option that I can see at this point would be to modify miniB3D itself and create a new function to read and render my smoke (but I'm not sure how to handle z-buffer sorting, if OGL doesn't do so automatically) that I include after cam.Update in Renderworld.
Is there an easier way to do this (I have the sneaking suspicion that I'm missing something fairly obvious)? I know there are particle systems already out there, but I'm interested in this as a learning experience as much as a practical solution. Anyone have any suggestions how to draw a single mesh multiple times at different places in one frame... or even a better way to do this?
Based on my reading of the miniB3D code, the TCamera.Update method clears the backbuffer for the next draw. So any attempt to draw a single mesh multiple times from outside code would be lost as soon as Renderworld is called. The best option that I can see at this point would be to modify miniB3D itself and create a new function to read and render my smoke (but I'm not sure how to handle z-buffer sorting, if OGL doesn't do so automatically) that I include after cam.Update in Renderworld.
Is there an easier way to do this (I have the sneaking suspicion that I'm missing something fairly obvious)? I know there are particle systems already out there, but I'm interested in this as a learning experience as much as a practical solution. Anyone have any suggestions how to draw a single mesh multiple times at different places in one frame... or even a better way to do this?