How to delete model from screen, but not from memory?

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
Mr.Gluck
Posts: 82
Joined: Tue Aug 31, 2004 8:02 pm

How to delete model from screen, but not from memory?

Post by Mr.Gluck »

In main loop i use DrawAll, where the model renders. And than I draw buttons and lines until user not click a button. When the user have pressed it, I change buttons, but model on screen. I dont know OO programming, so i dont know how to do it? I write model->drop , but no effect. And I want to save model in memory to draw it again when user go to main menu again.

And how to draw model with simple function, as, for example, draw2dline ?
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Post by Peter Müller »

Your model won't be deleted from memory if you drop it and grab it somewhere else. I think the meshpool will only be deleted when you close the device.
I think you're searching the method 'setVisible' from ISceneNode.

Why line2d? If you want to draw 3D you should use line3d, but if you just want to have a wireframe model, then you should set the wireframe material type.
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
Mr.Gluck
Posts: 82
Joined: Tue Aug 31, 2004 8:02 pm

thanks

Post by Mr.Gluck »

Thank you... "setVisible" is what i looked... ;)

Hm, I load for menu 12 models... and then i want to delete them from memory while the user is in a game loop (not menu), but if he want to change model I must to load it again? 12 models is too much to save each in memory?

May be irrlicht move unneeded models and textures to swap or simply save links to them?
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Post by Peter Müller »

What do you mean with 'save link'. Perhaps it moves the not needed data form the ram into the hw, or loads it again (would be faster), but i'm not sure about this.
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
Mr.Gluck
Posts: 82
Joined: Tue Aug 31, 2004 8:02 pm

...

Post by Mr.Gluck »

Peter Müller wrote:What do you mean with 'save link'. Perhaps it moves the not needed data form the ram into the hw, or loads it again (would be faster), but i'm not sure about this.
I dont difference global RAM and video RAM. It's for me is memory. So link is for me a pointer in memory to model's file on hdd. Because it is not serious to store unneeded models and textures in RAM.

And how I can know with irrlicht, what piece of video RAM is used?
Post Reply