Were can I find information on best practices for generating graphics in textures? In GameMaker, it is so easy to just create a surface, set the surface target, draw to it (like a circle for example) and then reset surface target and clear the surface when I am done with it.
With godot, I am confused as to were I need to find guidence for things like this? So any links to things I should be reading into other than the godot docs would be apriciated thanks!
I have a TextureButton and have set the texture_normal to a new ViewportTexture resource. I have assigned this to a viewport. Works fine but this doesn't seem all that efficient because what if I do not need to modify the contents of the viewport any longer but also want to retain the image data.
So I tried removing the viewport node and its children at runtime (which updates the texture). But I only want to get rid of this for optimization (not to actually get rid of what can be viewed from the ViewportTexture. A solution I have thought of was to copy the texture from the ViewportTexture to a new texture and then use that as the texture for the TextureButton.
I am so baffled by the documentation, I just simply want to know how to copy textures and cannot even find a solution through search. What baffles me even more, is that I still do not know the best practice for a simple drawing to a texture. For example, I know you have functions like draw_circle, in the CanvasItem but my understanding is that you must use a viewport in order to capture those draws (similar to how you would using surfaces in GameMaker).
Is there a way to pause or lock updates to the ViewportTexture or do I need to use a copy of the texture to do that?
Thanks