strange texture size


in my app i got a lightmap texture which is about 9000 x 9000 texels in size, giving a total of 81,000,000 texels. it is stored in RGB format, so i guess it uses one byte each for the R, G and B component, giving it a total size of 81 000 000 x 3 = 243,000,000 bytes, which are 237305 kb, which are about 231 mb. But my graphics card only has a memory of 64 mb, and there also is other data, such as 100 display lists which cover a terrain with about 240,000 triangles, several objects etc. but still, the program runs absolutely smooth and fast. How is this possible? Am i getting something wrong? If a lot of texture swapping between graphic board memory and main memory would happen, one surely would notice this?


Your video card only supports 4096x4096 textures at best. Older cards only support 2048x2048 or less. Presumably you’re using gluBuild2DMipmaps() to upload your image – this function automatically scales your image down if it is too large (it uses the proxy texture mechanism).

To see for yourself that this is indeed what’s happening, draw a couple of lines on your texture that are one pixel apart, and see how they look in your app.

– Tom

thanks, you are right .