gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > How textures are created and stored

#48957 - revo - Sun Jul 24, 2005 8:54 pm

Hi I have some question - I make some tests on Textured_Quad demo from ndslib, and I had 2 textures and changing betwen them on L,R button. It works well. I was wondering where DS store textures - I thought that in VRAM_A (in case of this demo). I know, that VRAM_A has limited size, so when I add some more textures, created in this way:

Code:
glGenTextures(1, &textureID[0]);
glBindTexture(0, textureID[0]);
glTexImage2D(0, 0, GL_RGB, TEXTURE_SIZE_128 , TEXTURE_SIZE_128, 0, TEXGEN_TEXCOORD, (u8*)texture);


I got problem with displaying new textures (grey quad, some errors in displaying).

So here is my question - do I need to recreate textures with glTexImage2D if I want to use a lot of them? I think there should be some other way to do it.
_________________
[ sorry for all mistakes, but my english isn't as good as I wish it to be ]