I want to use several large textures in my game. 1024x1024 is what I’m testing with.
The problem is 20 of those use up to much texture memory. I solved this by only loading four textures at a time since only four is close to the camera at a time and I made the textures further away smaller.
My problem is switching between textures. If I change one 1024x1024 texture each frame with glTexSubImage2d() or glTexImage2d() the framerate drops to about 5 (I have a Rage128) The textures are stored in pointers in RGB 24 bit.
each frame I do this:
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 1024, 1024, GL_RGB, GL_UNSIGNED_BYTE, texture);
the texture is initially set up like this:
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexImage2D(GL_TEXTURE_2D, 0, 3, 1024, 1024, 0, GL_RGB, GL_UNSIGNED_BYTE, texture);
[This message has been edited by Erik Rufelt (edited 10-11-2000).]