forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Solved]Unloading data (textures, meshes) in LTE Mod

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Pihas



Joined: 25 Oct 2008
Posts: 60
Location: Lithuania

PostPosted: Fri Jun 25, 2010 1:11 am    Post subject: [Solved]Unloading data (textures, meshes) in LTE Mod Reply with quote

I am creating a game and stucked with changing level, i need to unload fully one scene and load another.

My game is based on switch (i can't destruct everythink like device->drop(); and load scene), for example:
Quote:
switch(SelectedLevel) {
case First:
//Some code for loading stuff
break;
}


I looked for it in irrlicht forums, but nothing helped
Code:
smgr->getMeshCache()->clear();

Got this:
Code:
In file included from main.cpp:159:
Loading/LoadLevel.h: In function ‘int engineMain(unsigned int, void*)’:
Loading/LoadLevel.h:12: error: ‘class engine::scene::IMeshCache’ has no member named ‘clear’
make: *** [main.o] Error 1


Is there any way just to replace loaded meshes textures ?


Last edited by Pihas on Fri Jun 25, 2010 1:54 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Pihas



Joined: 25 Oct 2008
Posts: 60
Location: Lithuania

PostPosted: Fri Jun 25, 2010 1:52 am    Post subject: Reply with quote

Solved
Code:
smgr->getMeshCache()->removeMesh(IntroSceneMesh);
if (IntroScene) { IntroScene->remove(); IntroScene = NULL; }


Can any body tell how to get ussage of rams by hombrew (Or full not only hombrew)?
Back to top
View user's profile Send private message Visit poster's website
Coldbird



Joined: 08 Feb 2007
Posts: 155

PostPosted: Thu Jul 01, 2010 8:38 pm    Post subject: Reply with quote

SceSize sceKernelTotalFreeMemSize(void);
It's in the pspsysmem.h header.

This only measure the user-space ram however... so the maximum memory in the beginning is 24mb... unless your homebrew uses the big-memory SFO flag which you can enable in the makefile of your project (for slim units only).

Kudos and good luck to you.
_________________
Been gone for some time. Now I'm back. Someone mind getting me up-2-date?
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group