Hey,
Is there a way I could change the size of a CCRenderTexture at runtime?
Thank you
Hey,
Is there a way I could change the size of a CCRenderTexture at runtime?
Thank you
You can only recreate it with a new size.
oh that’s an overkill.
anyways thanks for the reply
May I ask why do you need to resize the CCRenderTexture?
well I’m drawing a sprite onto a RenderTexture to apply multiple shaders on it but that sprite grows and shrinks at runtime so I thought if could scale the RenderTexture to have it the same size as the sprite I would save some memory. I solved it by creating a RenderTexture that has the size of the sprite when it grows to the max and I create it only once.
That’s a wise solution (if you have enough memory), since continuous allocations of texture memory will kill the performance.