i have made a simple Line Drawing prototype that is practically a clone of 2D GD Paint Demo.
the part that i need but cannot do should happen in the Pencil script, every time i release my finger/mouse: drawing the 500×500px area that is within the "Canvas" area onto the "ImageTexture" Sprite node. i could already make the part that should happen afterwards: clearing the points Array because at this point the Line should have been drawn into ImageTexture.
before you ask why i need to draw the line into the texture: re-drawing all the points every time a new point is added quickly becomes inefficient, especially on phones where it goes to less than 10 fps. in less than 30 seconds of drawing time. if i could instead draw the last-drawn line into a texture after it's been finished drawing, i could clear the points array so that i can draw the next line with close-to-maximum performance again.
please take a look in my project (especially the "Pencil" script) and explain me how i could draw the line into the "image texture" Sprite node, because i have node idea where to start.