About textures

If I have understood right, the openGl textures goes into graphics cards memory when you make one. So, are the loaded textures removed from the graphics cards memory when I quit my program? Is there a function for removing the textures from the memory while the programm is running?

Yes, yes I know I should know this well if I use OpenGl but haven’t just thought it before.

the openGl textures goes into graphics cards memory when you make one.

Maybe, maybe not. You, as a programmer, can’t tell OpenGL where the texture is supposed to go, and OpenGL don’t tell you where the texture is located. You never know where the texture goes, but on modern hardware, I guess it safe to say it goes to the graphics memory though, assuming you have some left.

So, are the loaded textures removed from the graphics cards memory when I quit my program?

Yes, then should be deleted automatically when the rendering context is destroyed. However, it’s always good to do it yourself, just to make sure, which leads us to the next question.

Is there a function for removing the textures from the memory while the programm is running?

If you would have done some simple research yourself, you would have found glDeleteTextures.