Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6971307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:49:23+00:00 2026-05-27T16:49:23+00:00

In my application i am using around 7 to 8 textures. i am doing

  • 0

In my application i am using around 7 to 8 textures. i am doing multiple texturing as well. when i delete all the textures using glDeleteTexture cmd and checking using glIsTexture command then getting GL_True for some textures.
I want to know at which conditions glDeleteTexture() function fails to delete the texture?

EDIT: Ok, i debug my code , and now i come to know there are mainly two problems:
at one stage in my application, i have a 3d model and on different touch inputs i am changing the textures on it. so at every touch input i am calling the following code

   glDeleteTextures(1, &tex1);
  switch(case)
  {
  case 1:
  tex1 = CreateTexture("xyz.pvr");
  break;
  case 2:
  tex1 = CreateTexture("abc.pvr");
  ...
  ...

where CreateTexture is given below

    UploadImage(file);
    GLuint name;
glEnable(GL_TEXTURE_2D);
glGenTextures(1, &name);
glBindTexture(GL_TEXTURE_2D, name);
glTexEnvf( GL_TEXTURE_2D, GL_TEXTURE_ENV_MODE, GL_DECAL);
glTexParameterf(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);


GLfloat fLargest;
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &fLargest);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, fLargest);

glTexImage2D(GL_TEXTURE_2D, level, format, w, h, 0, format, type, data);
    UnloadImage();

This code is giving me some leakage at every touch input.
Secondly in the end i have to free all textures and load different data.So i am deleting all the textures using following comands

    glDeleteTextures(1, &tex1);
glDeleteTextures(1, &tex2);
    glDeleteTextures(1, &tex3);
glDeleteTextures(1, &tex4);
    glDeleteTextures(1, &tex5);
glDeleteTextures(1, &tex6)

and then checking either its deleted or not using

    glIsTexture(tex1);
    glIsTexture(tex2);
    glIsTexture(tex3);
    glIsTexture(tex4);
    glIsTexture(tex5);
    glIsTexture(tex6);

but getting true for some textures.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:49:24+00:00Added an answer on May 27, 2026 at 4:49 pm

    You should investigate that yourself, by adding code to track the returned error from OpenGL. Perhaps you’re doing the delete at a bad place in your code, while the texture is still in use, or something. Call glGetError() after the OpenGL calls you wish to investigate, and log the result.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been playing around with creating an application using the S#arp Architecture . One
I'm playing around with building a new web application using DB4O - piles of
I'm doing my first Java EE web application using glassfish and netbeans. When I
I'm developing web application using CodeIgniter. All this time, I put the custom js
I have developed a few Delphi Win32 (currently using D2007) applications, which revolve around
Im creating a c# application using visual studio 2010 on a windows 7 machine.
I baked an application using console and from URL everything seems ok. But when
In a web-application (using Flask), I get the following error: Unable to retrieve the
I have an application using a MongoDB database and am about to add custom
I'm writing web application using codeigniter framework. Here is the structure of document root

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.