Is it possible to resize a Render Target texture, or do I need to delete it and recreate it if it needs to change size?
I'm using RT textures to render a string with a TTF font (as it was suggested elsewhere on the forum), and I wonder if there's a way to resize the texture if the text ever gets bigger or smaller.
Resize a RT texture
Re: Resize a RT texture
Delete & recreate. For text, maybe just create a screen-sized texture, so you can reuse that.
Re: Resize a RT texture
Oh, that's a good idea!
That brings me to the question : is there a limit (apart from a hardware limit) to the number of RT textures created simultaneously?
That brings me to the question : is there a limit (apart from a hardware limit) to the number of RT textures created simultaneously?
Re: Resize a RT texture
Available memory (both RAM and VRAM).
Re: Resize a RT texture
You also can reduce or increase the area you want to sample from in a RTT by changing the texture coordinates you want to sample from, and you can reduce or increase the area you render into by changing the rendering viewport during the RTT processing. That normally is used in conjunction to reduce and increase the rendering resolution without the need to recreate the rendertargets.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt