Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: strange texture size

  1. #1
    Advanced Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    680

    strange texture size

    Hello,

    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?

    Jan

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Location
    Belgium
    Posts
    807

    Re: strange texture size

    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

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Apr 2003
    Posts
    680

    Re: strange texture size

    thanks, you are right .

    Jan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •