SpritesCubers

Blitz3D Forums/Blitz3D Programming/SpritesCubers

Neochrome(Posted 2006) [#1]
in copy entity system will this make the copies inherit everything from the source?

as in if i make 10 copies of say cube 0, and i change something on cube 0, will the copies automatically follow suit? since i think i've read somewhere that copied entities dont take up anymore memory ?

what im getting at is, i want to make a cube partical system using copy entity ; but im concerned with mode switching

i know copy mesh will make a NEW instance of the model and will be completly seperate and will take up some memory and the video card will have to process ITS texture data too? am i right in assuming this?


Naughty Alien(Posted 2006) [#2]
..well..I just now tried to create multiple copys of one cube and after I did that I use freeentity(original_cube)..all 'clone' cuber remain on scene after I remove origin from scene and memory..soo..I am not sure in to what extend they are dependent on to each other..


Ross C(Posted 2006) [#3]
Your basically copying the entity properties and referencing the mesh. Any changes to the mesh will change all copies. Same with the texture. But chancing any of the entity properties will only affect that specific copy. FreeEntity is an entity command and will only delete entity information. I believe blitz checks to see if any other entities reference that mesh upon using FreeEntity. If the entity you are currently freeing is the last reference to the mesh, it delete 's the mesh from VRAM, or RAM.

I'm pretty sure that's the way it works, but don't hold me to that :o)


Naughty Alien(Posted 2006) [#4]
..Ross..I have been deleted origin mesh..one from where i use to copy all others...so I'm wondering whats happening with those copied mashes if I have been deleted origin??


b32(Posted 2006) [#5]
They remain. The original mesh stays in memory. There is no command to free the mesh directly. It is freed automatically after all dependant entities are released.