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: texture memory

  1. #1
    Intern Contributor
    Join Date
    Feb 2000
    Location
    Stafford, UK
    Posts
    60

    texture memory

    When I create textures (Using the methods used in most tutorials with bitmaps), is the texture copied to video memory, or main memory?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,982

    Re: texture memory

    Hello

    It depends on what system/drivers you got. If you have a hardware accelerated board, it will most certainly be uploaded into the video memory.

    If you use too many large textures, the ones that not fit into the video memory, will remain in the main memory.

    Bob

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    London
    Posts
    503

    Re: texture memory

    Actually a bit more complicated than that...

    For a software renderer, textures are always in main mem.

    For a non-AGP hardware renderer (assuming it isn't falling back to software for some reason), textures are always copied to video mem. Where they won't all fit, this often leads to thrashing every frame, because most drivers current discard the least recently used texture. John Carmack has recently posted a plan file arguing that discarding MRU would probably be better, odd though it may sound.

    For an AGP hardware renderer, textures can be stored in either main or video mem; it's up to the driver and will depend on available vidmem.

    Lastly, most if not all Windows drivers will keep a copy of the texture in main mem, even if they've uploaded it to video mem. This is because Windows can trash the contents of videomem without warning in some cases (e.g. BSOD).

    Hope this helps :-)

Posting Permissions

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