PDA

View Full Version : sized internal texture format support?



andras
06-19-2005, 11:39 AM
Is there a document somewhere describing the supported sized internal formats for various videocards?

The project I'm working on is _extremely_ heavy on video ram, and texture compression is not always a good choice (eg. when modifying textures on the fly). So in some cases I would like to use formats like GL_RGB5, and such.

Problem is, in OpenGL the internalformat is just a hint! I understand how this is elegant and everything, but I really, really have to know if my RGB texture is going to be stored @ 16, 24 or 32 bits/texel!!

Hmm, just out of curiosity: I'd also love to know the performance impact of compressing textures on the fly, and what are the requirements for a glTexSubImage call with a compressed internal format, so that the whole texture need not be reloaded! Eg. for a DXT1 texture, do I have to align my updates to 4x4 texels? I know I could make a test app, to figure it all out, but I'm really short of time, and if one already knows the answers (and I'm sure HW vendors do), it would be a huge help!!

Thanks!

andras

andras
06-19-2005, 11:59 AM
Hmm, one more crazy idea about compressed texture updates: I know that if I use glTexSubImage, then it's a blocking call, ie. it will stall, until the driver makes a copy of the data. Now, I'd like to avoid stalling at all costs, if possible. So what happens, if I used PBOs, to update the texture from? Now, the call wouldn't stall (of course, it might, since I guess it also depends on the implementation..), until someone maps the PBO. This brings up another question: even if the upload is non-blocking with regards to the main app, it might block rendering, when the currently updated texture is bound to a texture unit! The question is: will the update block rendering?

Thanks,

Andras

andras
06-19-2005, 01:02 PM
Okay, one more question: when I run out of texture memory, the driver will probably copy the least recently used textures back to system ram, to free up some space. This is fine, but even though I do not render using this texture, I might still want to continue updating it (so when it comes to rendering, it's all ready). To do this, I have to bind the texture. Question is, will this result in the texture being copied back to vram? Or as long as I only update with glTexSubImage, will it remain in system ram??

Thanks!

Brolingstanz
06-19-2005, 02:54 PM
Is there a document somewhere describing the supported sized internal formats for various videocards?your ihv's web site is a good place to start for this sort of thing. nvidia has more white papers, presentations and specs than you could reasonably hope to read in an average lifespan.

i know nothing of a compendium.

regards,
bonehead

AlexN
06-19-2005, 03:13 PM
For nvidia, http://developer.nvidia.com/object/nv_ogl_texture_formats.html

and for ATI 9500+, look at the OpenGL SDK here:
http://www.ati.com/developer/sdk/radeonSDK/html/info/Prog3D.html

andras
06-19-2005, 04:42 PM
Hah, I was looking at nvidia's developer website, but somehow missed this doc! Thanks!