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 

PSPGL - unloading textures from memory.

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



Joined: 04 Jul 2006
Posts: 30

PostPosted: Mon Aug 28, 2006 9:44 pm    Post subject: PSPGL - unloading textures from memory. Reply with quote

Hi,

How to relase memory (or vmemory) from texture data? Im loading level of my game :

Level Data (objects), gamedata and textures :

glGenTextures(1,(unsigned int*)&mojetekstury[1]);
LoadTexture("images parental.png",mojetekstury[1],GL_CLAMP_TO_EDGE,false);
.... etc.

And when the level ends i need to relase memory (or vmemory) because i cant load textures for another level (my console hangsup after loading 3 - 4 textures).

So, how to free console memory and make room for another textures?

/lar
Back to top
View user's profile Send private message Visit poster's website
siberianstar



Joined: 22 Jun 2006
Posts: 70

PostPosted: Tue Aug 29, 2006 9:13 pm    Post subject: Reply with quote

glDeleteTextures( int size , int *names );

There is a bug on glDeleteTexture that wasn't freeing the texture from memory, i've fixed it :

open glDeleteTexture.c and replace the line 19 with

__pspgl_texobj_free(tobj);

then recompile pspgl.

NOTE: If you don't fix this bug PSPGL won't free the texture.
Back to top
View user's profile Send private message
LarryTM



Joined: 04 Jul 2006
Posts: 30

PostPosted: Thu Aug 31, 2006 6:30 am    Post subject: Reply with quote

Thank you very much! :)
Back to top
View user's profile Send private message Visit poster's website
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