PDA

View Full Version : About OpenGL texture object



12-29-2001, 10:20 PM
Before I delete the render context,
Do I have to delete its associate texture object? Did OpenGL cleanup the texture object
automatically so I don't have to worry about that?

Korval
12-29-2001, 11:13 PM
You probably should delete the texture objects, just to be safe.

Leyder Dylan
12-29-2001, 11:46 PM
I think tha OpenGL deleted automaticaly the textures when you shutdown your program.

To be confirmed ...

12-30-2001, 07:03 AM
And what about display lists or other resource?

plates
12-31-2001, 03:08 PM
Normally clean up display lists with glDeleteLists() command. - It takes some paramaters but I can't remember them offhand.

01-01-2002, 07:48 PM
Does OpenGL cleanup the resource allocated within the render context so there is no memory leaking after the program terminate?
I am not warry about dangling resource that is never be reference but I do worry about leaking resource after the program terminated.

01-01-2002, 09:55 PM
And I also notice that if I don't bind texture object the current texture object has ID = 0 and can be use like other texture object.
And you can bind to texture object that has any ID that doesn't create using glGenTextures
so does OpenGL detecting the use of any texture ID?

01-03-2002, 10:36 PM
Texture ID 0 is the default texture, it's no texture at all. I don't think if you bind a invalid texture id it defaults to 0.

01-04-2002, 02:46 PM
Should be I think it will default to texture id 0 if you try to use a nonexistant texture id.