| View previous topic :: View next topic |
| Author |
Message |
LarryTM
Joined: 04 Jul 2006 Posts: 30
|
Posted: Mon Aug 28, 2006 9:44 pm Post subject: PSPGL - unloading textures from memory. |
|
|
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 |
|
 |
siberianstar
Joined: 22 Jun 2006 Posts: 70
|
Posted: Tue Aug 29, 2006 9:13 pm Post subject: |
|
|
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 |
|
 |
LarryTM
Joined: 04 Jul 2006 Posts: 30
|
Posted: Thu Aug 31, 2006 6:30 am Post subject: |
|
|
| Thank you very much! :) |
|
| Back to top |
|
 |
|