Release texture memory

Release texture memory



I would like to know what is the correct way to release memory used by a texture/image pair. Currently I am using:






Assuming that I correctly store both images and textures handles when I create them, is the above enough to clear the memory used by those two handles, when I need to?

My current application needs to update textures frequently, so I need to release their Embree memory, but the above is apparently not working.



Thread Topic: 

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


Embree itself does not support textures or framebuffers as it is just a collection of high performance ray tracing kernels. Textures and framebuffer-handling has to be done by the application (e.g. the Embree tutorials). Did you try to extend/modify one of the Embree tutorials?  


Yes, I am using the Embree Renderer example. I see that it is now surprisingly unsupported, even being a nice starting point. But then, my changes are working nicely, except for the fact that I can't find a way to free texture memory when I update them, causing huge memory leaks.


Apparently, rtClear() does nothing?





I'm sorry but the Embree renderer is obsolete and unsupported. We haven't touched the code for years and I'm not even sure that freeing texture memory was ever implemented, as it was just a simple example renderer to showcase the Embree kernels. As an alternative we have a much smaller and simpler path tracer (without texture support) now included in our Embree tutorials. If you are looking for a more complete path tracer you might want to have a look at the OSPray project (​).

Hope this helps.

Leave a Comment

Please sign in to add a comment. Not a member? Join today