Some Questions about Optimization ( SOLVED )

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
r3i
Posts: 147
Joined: Wed Jun 29, 2005 10:15 am
Location: Sorrento
Contact:

Some Questions about Optimization ( SOLVED )

Post by r3i »

If i make a mesh invisible calling setVisible( false ), memory will free or not?

And if I've 2 object with the same textures, if I remove only one, i will lose the texture on the other?
Last edited by r3i on Thu Nov 10, 2005 1:17 am, edited 1 time in total.
"We work in the dark, we do what we can, we give what we have, Our doubt is our passion and our passion is our task. The rest: is art of Madness" (H.James)
genesisrage
Posts: 93
Joined: Tue Feb 08, 2005 12:19 pm

Post by genesisrage »

1. i dont think it will free up any memory, because its still "there" just not visible (not positive though)

2. i dont see why it would, if you set the textures as a pointer, then removing the pointer itself would get rid of the texture
r3i
Posts: 147
Joined: Wed Jun 29, 2005 10:15 am
Location: Sorrento
Contact:

Post by r3i »

ok for the first: so is only a mode to display or not.
but for the 2 point, i would call driver->removeTexture( name );
"We work in the dark, we do what we can, we give what we have, Our doubt is our passion and our passion is our task. The rest: is art of Madness" (H.James)
genesisrage
Posts: 93
Joined: Tue Feb 08, 2005 12:19 pm

Post by genesisrage »

1. it may free some graphic memory because its not rendering it, but the object itself is still loaded into memory whether its shown or not.
Removes a texture from the texture cache and deletes it, freeing lot of memory.
this is from the API Docs, but it does also state that any pointers to the texture may not work.
r3i
Posts: 147
Joined: Wed Jun 29, 2005 10:15 am
Location: Sorrento
Contact:

Post by r3i »

Thank you genesis!
I've a great problem: I0ve an huge model with many textures,
I'm triyg to spend the less memory I can

thank you for your explanation.
Now I'll try to use some effect inorder to make my texture smaller than now...some kind as maketexture planar
"We work in the dark, we do what we can, we give what we have, Our doubt is our passion and our passion is our task. The rest: is art of Madness" (H.James)
genesisrage
Posts: 93
Joined: Tue Feb 08, 2005 12:19 pm

Post by genesisrage »

i havent tried with this engine but i know with others i have used you are able to have multiple objects that use the same mesh info. so if you model has 15 parts that are identicle it would only need to load it once into memory.

not for sure how to do that in this engine, but i would bet that it is possible.
r3i
Posts: 147
Joined: Wed Jun 29, 2005 10:15 am
Location: Sorrento
Contact:

Post by r3i »

Yeah: it's so.
But I've 35 textures of 2.Mb for once all different.
I'm triyng to remove some parts of the model that camera doesn't see for having more stability
"We work in the dark, we do what we can, we give what we have, Our doubt is our passion and our passion is our task. The rest: is art of Madness" (H.James)
pfo
Posts: 370
Joined: Mon Aug 29, 2005 10:54 pm
Location: http://web.utk.edu/~pfox1

Post by pfo »

r3i: Did you try using the OCT Tree scene node? It will break a big mesh up into smaller nodes and render them selectively, it's faster at rendering larger meshes (like quake maps)
r3i
Posts: 147
Joined: Wed Jun 29, 2005 10:15 am
Location: Sorrento
Contact:

Good idea

Post by r3i »

Done but the scene have many polys and huge textures.
Octtreee reduce my time of loading the scene but i spend many resources for drawing the model!
"We work in the dark, we do what we can, we give what we have, Our doubt is our passion and our passion is our task. The rest: is art of Madness" (H.James)
Post Reply