Texture caching with opengl?

hey,
i was wondering if the pixel format of the texture when it is generated using the “gen” func applies to the way it is stored on the gfx-card, or just as a flag.
the question is about caching textures of totaly different formats, like RGBA and LUMINANCE. whether or not they are translated to RGBA in the card’s memory (= can i update a texture with a different format). i ask this because i try to avoid generating textures and instead update them.
moreover is it a gl spec or is it each driver’s uniqe implementation?

thnx :wink:

You can never know, as GL has no specified behaviour in this case. Hovewer, I am 100% sure that current cards actually store texture mipmaps in the memory and not generate them on demand (would be useless, or?). I think, at least on Nvidia, luminance textures have own format and are not stored as RGBA. As far as I know you can update textures with almost any data format you want, the data will be converted. I don’t recall the details though (possible that updating luminance textures with RGBA data will extract the R component, but I am not sure anymore).