I'm using bglTexFromPixmap() to create my textures. Everything is working fine so far, but my question is, how are these textures then deleted from memory? I mean, does BlitzMax take care of this in a similar manner to objects, like Timage objects? Or do I have to Release them like integer object handles? Or do I need to explicitly delete them using glDeleteTextures and if so what is the correct syntax for this? Any help on this subject would be appreciated. Thanks.
Freeing textures?
BlitzMax Forums/BlitzMax OpenGL Programming/Freeing textures? I would assume since it is an integer handle that you would use release to free it (and make sure you are using flushmem).
I would assume since it is an integer handle that you would use release to free it (and make sure you are using flushmem).
Yeah. I was leaning towards that conclusion. Been doing a little testing, and Max is acceptinggldeletetextures 1,Varptr textureand
Release textureas both valid, but MemUsage() is not showing any differance.
MemUsage probably doesn't show the video ram?
Otherwise, what is that and how does it work?
Otherwise, what is that and how does it work?
The only way you can delete GL textures is glDeleteTextures, ala'
So, if you do Release, all you're going to do is create some screwed up memory errors.
glDeleteTextures( 1, Varptr Name )
So, if you do Release, all you're going to do is create some screwed up memory errors.
Cheers Noel. Additionally is there any way to monitor texture/video memory? As Angel pointed out MemUsage() doesn't show this.
Ok got it working now. I've set up a type to take care of auto-deleting the textures with FlushMem(). Check it out Texture type.