Results 1 to 5 of 5

Thread: Unloading Textures From Memory

  1. #1

    Unloading Textures From Memory

    Hi.

    Anyone knows how to destroy a texture and freeing it's memory that's created with glGenTextures ??
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

  2. #2

    Unloading Textures From Memory

    I'm not sure about this, but what if you would assign the value 0 to the texture variable?
    Do it by the book, but be the author!
    <br />
    <br />Visit the Lion Productions website at:
    <br />http://lionprod.f2o.org

  3. #3

    Unloading Textures From Memory

    I think glDeleteTextures does the trick:

    Quote Originally Posted by First page I found about it from google
    glDeleteTextures deletes n textures named by the elements of the array textures. After a texture is deleted, it has no contents or dimensionality, and its name is free for reuse (for example by glGenTextures). If a texture that is currently bound is deleted, the binding reverts to 0 (the default texture).
    Your array would contain IDs from glGenTextures for each texture to squish.
    "All paid jobs absorb and degrade the mind."
    <br />-- Aristotle

  4. #4

    Unloading Textures From Memory

    okey, thanks, think it's works =)
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

  5. #5

    Re: Unloading Textures From Memory

    Quote Originally Posted by AndreasL
    Hi.

    Anyone knows how to destroy a texture and freeing it's memory that's created with glGenTextures ??
    For remove texture from memory use this:

    glDeleteTextures(1, @texture);
    C2D X6800, 4GBRAM, NV8800GTX, Vista x64 Ultimate

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
  •