garrysmod-requests icon indicating copy to clipboard operation
garrysmod-requests copied to clipboard

Add render.DestroyRenderTarget(string)

Open Rusketh opened this issue 10 years ago • 2 comments

I think most people would agree with me, that there should be a way to destroy render targets and clear them from memory.

My request is for render.DestroyRenderTarget(string name)

The string given to this function should be the internal name of the render target that was passed to GetRenderTarget( string name, number width, number height, boolean additive ).

I am guessing this functionality is not currently implemented for a reason, if so could you please specify that reason for future reference.

Rusketh avatar Mar 17 '15 00:03 Rusketh

+1. In fact, a way to remove any material/texture from memory once it's no longer in use would be VERY welcome.

There's a feature in my server where you can apply images from the internet to props, via an API I created that converts them to VTFs that can be downloaded and then used by clients.

However, if the prop is removed, there's currently no way to tell GMod "I'm done with this texture" even though it's no longer being used by anything.

This creates a fairly massive memory leak as time goes on as multi-MB textures are added to memory and never removed.

WinterPhoenix avatar May 10 '24 22:05 WinterPhoenix

please? 🥺

garryspins avatar Jun 20 '24 01:06 garryspins