Deleting Datablocks
by Michael Cordner · in Torque Game Builder · 10/10/2005 (7:12 am) · 1 replies
Hi all,
From previous discussions, I understand that there is currently no way, in 1.0.2 to delete an image datablock from script and free the underlying texture data.
I would like, if at all possible, to make some changes to the engine to allow for deletion of an image datablock and all of the underlying data and structures associated with it. My reason is that my current game is made up of several scenes, each one with quite a lot of unique sprite data. I'd like to keep overall memory requirements low, so my current thinking is that I'd like to load and unload scene specific datablocks as the user moves from screen to screen.
Before I start diving into the details, I have a couple of questions to ask of anyone who's in the know on this subject.
1) am I correct about there being no way to delete (that is delete the underlying texture data from memory) image datablocks from script?
2) Has anyone done anything similar to the engine, or has any advice on how to go about it?
Thanks!
-Mike
From previous discussions, I understand that there is currently no way, in 1.0.2 to delete an image datablock from script and free the underlying texture data.
I would like, if at all possible, to make some changes to the engine to allow for deletion of an image datablock and all of the underlying data and structures associated with it. My reason is that my current game is made up of several scenes, each one with quite a lot of unique sprite data. I'd like to keep overall memory requirements low, so my current thinking is that I'd like to load and unload scene specific datablocks as the user moves from screen to screen.
Before I start diving into the details, I have a couple of questions to ask of anyone who's in the know on this subject.
1) am I correct about there being no way to delete (that is delete the underlying texture data from memory) image datablocks from script?
2) Has anyone done anything similar to the engine, or has any advice on how to go about it?
Thanks!
-Mike
Torque Owner Michael Cordner
www.garagegames.com/mg/forums/result.thread.php?qt=32457
And clarified somewhat in this one:
www.garagegames.com/mg/forums/result.thread.php?qt=34439