Resize a RT texture

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
MartinVee
Posts: 139
Joined: Tue Aug 02, 2016 3:38 pm
Location: Québec, Canada

Resize a RT texture

Post by MartinVee »

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.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Resize a RT texture

Post by hendu »

Delete & recreate. For text, maybe just create a screen-sized texture, so you can reuse that.
MartinVee
Posts: 139
Joined: Tue Aug 02, 2016 3:38 pm
Location: Québec, Canada

Re: Resize a RT texture

Post by MartinVee »

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?
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Resize a RT texture

Post by hendu »

Available memory (both RAM and VRAM).
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Resize a RT texture

Post by Mel »

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
Post Reply