I got a small project running with a lot of textures(400+). I figure that ain´t no good to bind them all at init. (They don´t fit in VRAM). My question is: What are the different ways to handle large texture resources in a project?
I think that you can bind them all (however verifying the success of the operation) and prioritize textures with the appropriate functions: so you can let opengl to handle the tranfers of the textures form ram to vram…
you could attempt to concatenate the textures (assuming that they are small) this would entail making the small textures a bigger one in a quilt like fashion and modifying texture coordiates
Just the same problem.
If I have lots of 32X32 textures will it be better(faster) if I concatenate them?
Sure, since you dont have to call glBindTexture every so often. The drawback is just that repeating/tiling the textures becomes a bit impossible.
Have to break up geometry then.
Also, when you page textures like this gluBuild2DMipmaps won’t work correctly so you’ll have to generate your own mipmaps.