texture memory management


excuse my english:-)
i am looking for documents about texture management mostly implemented by driver vendors,what happens when i call glBindTexture…i think i can speed up texture switching times when i detect size of texmem,then create textures fot mostly used resolutions/color depths and then use some LRU algorithm and fill this frames with glTexSubImage…but maybe drivers allready using some king of this management which may collide with my and everything slow down…any ideas?
thanks a lot,


What I have been doing (based on some advise from here), is basically doing what you are suggesting, i.e. have a set of Bound texture objects (via glBindTexture) for each important resolution, and then loading textures from disk cache and using glTexSubImage2D to load up to the already defined texture objects.

There are no conflicts at all with this method, that I know of anyway.

Its only useful for the case I described when you need to retrieve textures from a disk cache. If you intend to store all of your textures in system memory, it is probably a much better practice to create texture objects for all of your textures, discard your copy of the image data, and let the driver handle them, as it will/should make use of AGP and card memory when it can.