Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Bill_C_
Beginner
77 Views

Release texture memory

Hello,

 

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

g_device->rtClear(g_images[index]);

g_device->rtClear(g_textures[index]);

 

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.

 

Thanks.

0 Kudos
3 Replies
BenthinC_Intel
Employee
77 Views

Hi,

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?  

 

Bill_C_
Beginner
77 Views

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?

 

Thanks.

BenthinC_Intel
Employee
77 Views

 

Hi,

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 (http://www.ospray.org/​).

Hope this helps.

Reply