Results 1 to 9 of 9

Thread: "Unload" OpenGL textures

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    "Unload" OpenGL textures

    May be a very simple question.

    I know, there's the glDeleteTextures procedure that does the work, so I can create a "texture manager" that loads and unloads the textures, but is there a way to delete all textures in a simple call?
    No signature provided yet.

  2. #2
    No, i don't think there are other ways. Possibly you can reinitialize the whole rendering context and OpenGL, but that's a little overkill compared to just going through each texture and deleting them 1 by 1.

  3. #3
    glDeleteTextures does the work and also can delete all your textures at once if you store all of them in a single Array.

  4. #4
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    I make my own procedures that will delete those loaded for specific purposes. You can load all your textures into any array like Jimmy states and then simply plug that number into glDeleteTextures yes, but if you want better management be sure to keep those that are needed only at specific times (level specific or splash screens) seperate from those needed all the time. (main menu and in-game menu graphics)
    Jason McMillen
    Pascal Game Development
    Co-Founder





  5. #5
    Ok. Then I should use a "texture manager".

    Thank you.
    No signature provided yet.

  6. #6
    This is obvious, but maybe you can use tlist as it is a general purpouse list manager with add, insert and delete metods for any kind of objects.

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
  •