-1

I am using glGenLists like this:

my_list = glGenLists(1)
glNewList(array_list, GL_COMPILE)
# some OpenGL instructions go here
glEndList()

In similar way I am using textues:

my_texture = glGenTextures(1)

If I understand correctly, the textures and lists are stored at GPU. How can I dispose them when I do not need them anymore?

Is enough to ovewrite the pointers (my_list = False). Or do I need to tell to pyopengl that I do not need them anymore somehow manually?

matousc
  • 3,698
  • 10
  • 40
  • 65
  • 3
    [`glDeleteTextures`](https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glDeleteTextures.xhtml)? [`glDeleteLists`](https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glDeleteLists.xml)? There is a glDelete* for each glGen* (and they are also linked on the bottom of each documentation page. – BDL Apr 15 '18 at 08:22
  • @BDL Excellent. – matousc Apr 15 '18 at 12:43

1 Answers1

1

There is a glDelete* that deallocates a previously allocated resource for each glGen*.

glDeleteTexture

glDeleteLists

Andreas
  • 5,086
  • 3
  • 16
  • 36