Results 1 to 2 of 2

Thread: Loading an image??

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2009

    Loading an image??

    Hello everyone..

    I'm new to the forum... and so to OpenGL..

    I need to know that is there some way to unload the loaded image..?? Like I've loaded an image using readBMPFile(...), but I want to replace it with another image... Do I need to unload the previous one ??

  2. #2
    Senior Member Frequent Contributor scratt's Avatar
    Join Date
    May 2008

    Re: Loading an image??

    If you are asking about getting rid of a texture GPU side then that can be done with glDeleteTextures....
    ...or reallocate the same texture ID with new data, overwriting the old.

    Any data CPU side you can delete anytime you like, after the image has been cached to the GPU. Although be aware that if you fill the VRAM then your OpenGL implementation may well look for the texture CPU side again when it swaps data around.

Similar Threads

  1. Image Loading Library for loading image textures
    By jitendra2896 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-03-2017, 12:13 AM
  2. Loading a image
    By imported_Justin in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-21-2010, 12:36 PM
  3. Loading an image
    By Erin C. in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-02-2008, 04:28 AM
  4. Replies: 2
    Last Post: 07-28-2003, 07:30 PM
  5. RGB Image Loading
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 07-08-2002, 12:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean