Results 1 to 2 of 2

Thread: glDeleteTextures...

  1. #1
    Member Contributor
    Join Date
    Dec 2001
    Location
    Raleigh, NC, USA
    Posts
    72

    glDeleteTextures...

    OK, I can't find the Red or Blue books ANYWHERE anymore, and it's really got me ticked, because all I need to know is the fraggin' format of glDeleteTextures(). I have tried everything and it fails.
    Code :
    //the texture layout
     
    typedef struct tagblah
      {
      short int numTextures;
      int *Texture;
      ...
      } blah;
     
    blah *MyBlah;
     
    ...
     
    glDeleteTextures(MyBlah->numTextures, MyBlah->Texture);
    Why isn't this working? I have tried swapping the variable places, I've used references, I've even tried making the struct static! Nothing works and I can't reference the books anymore. There is one out there, but it totally sucks, has no search option, and is missing 50% of the functions I use, so I am assuming it is an old one.
    -Sephiroth

  2. #2
    Member Contributor
    Join Date
    Mar 2003
    Location
    Suffolk, United Kingdom
    Posts
    99

    Re: glDeleteTextures...

    When you create texture id's for the texture objects -

    Code :
    GLuint textureid[5];
     
    // generate texture id's
    glGenTextures(5, textureid);
     
    // create texture objects
    glBindTexture(GL_TEXTURE_2D, textureid[0]);
    // ... etc.
    ... then when you come to delete them -

    Code :
    glDeleteTextures(5, textureid);
    I'm not sure why you have defined a struct around this. If you have your texture id's in anything other than an array of GLuint's then OpenGL won't work correctly anyway.

    Can you post the code where you initialise this struct?


    [This message has been edited by Rog (edited 07-09-2003).]

Similar Threads

  1. Bug with glDeleteTextures on bound textures
    By poppyto in forum OpenGL ES
    Replies: 0
    Last Post: 09-06-2013, 02:33 AM
  2. glDeleteTextures problem
    By destiny in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 04-28-2008, 01:27 AM
  3. glDeleteTextures
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 02-17-2005, 08:48 AM
  4. glDeleteLists and glDeleteTextures
    By ARES in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-18-2002, 02:06 PM
  5. Problems with glDeleteTextures
    By jeppa in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 04-04-2001, 08:20 AM

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