Results 1 to 4 of 4

Thread: Opengl Textures and Memory

  1. #1

    Opengl Textures and Memory

    I don't really understand the way memory is allocated by opengl for the textures, what is the limit ? is it limited by the system/swap, video m?İmory ?

    I'm trying to build a "texture manager" class that load and free textures on the fly, but i don't know when the memory is full...

    is there a trick ? I tried googling, but never found something interesting or understable...

    many thanks

  2. #2

    Re: Opengl Textures and Memory

    It might be useful for you:
    http://www.glsoftworks.pastebin.com/m1b9f3662

    It isn't finished, but contains some useful stuff you should take a look at.

  3. #3

    Re: Opengl Textures and Memory

    Quote Originally Posted by Brainer
    It might be useful for you:
    http://www.glsoftworks.pastebin.com/m1b9f3662

    It isn't finished, but contains some useful stuff you should take a look at.
    Thanks!
    I looked at your code, your manager load and free textures but I don't know the amount of memry taken by all the textures, and the memory left... that's why my question.
    May be opengl has it's own memory management ?

  4. #4

    Opengl Textures and Memory

    Of course it does. Textures must be swapped dynamically by the library, not you. Just load only what you need or what you're precaching and GL will do the rest.

Bookmarks

Posting Permissions

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