Original Post
So, i have a basic texture manager that loads from disk any textures that are needed by my render system. Now, lets say an object starts getting quite far from the camera such that only the mipmaps > 4 are visible (for example). What I would like to do is free from memory the top 3 mimaps as they are no longer needed at the moment. By free I mean that, to the gfx card, the 4th mipmap is actualy now the top most (level 0) mipmap. My rendersystem is cross API. As far as directx 9 goes, there is a convenient function for managed textures, "SetLOD()" which allows me to do just what I want. However, for directx 10 and opengl, I can find no equivelent. The only way I can think to do this management with the other API's is to completely free the entire texture, then recreate the whole texture with only the mipmaps I want. This would involve reading the original texture from disk again, unless i keep a local copy of the original data in system ram, as well as the obvious cost of freeing/allocating texture memory. My question: is there a smarter way to do this, or am i stuck with freeing/reallocating the texture each time i want to remove/add a mipmap? A side question: relatively how expensive is texture memory allocation ( with for example directx's CreateTexture() )?