In the newer d3ds (10 and up) there is a mechanism whereby one can effectively change an texture format - it is called "views" there.
This is hardly one of the more useful features. Actually I only know of one practical use, that is, to change from srgb to non-srgb and the other way around (which was just a sampler state in previous directx-es).
Anyway, as the various vendors actually support the newer d3ds, and with them this particular feature (the mutable texture formats), why can't we access this hardware capability from opengl?
So i suggest that we make the texture formats "mutable". That is, once the texture is created, its format can be changed with glTexParameteri.
The sampelr objects will also possess a format state, which will override the texture's, just like the other parameters.
Of course we will have to divide the various formats into groups of mutual compatibility. Then a texture's format can be changed only to one of those that are from the compatibility group of the original format.
If a sampler's format is not compatible with the bound texture we act as in other similar cases - e.g. generate INVALID_OPERATION on the subsequent draw commands.
The format is actually property of the texture levels and not of the texture object itself, but this is so only for historical reasons. (different mip formats within the same texture is possible but it only makes the texture unusable and is a burden for the drivers to deal with).
Changing the format with glTexParameteri will apply to all mips at once.
This will give the full functionality of the directx-es, but with much simpler and intuitive api (the directx way is way too complex and bloated with the numerous pointless objects you have to create and manage).
What do you think?