periodically capture jit.gl.sketch to texture to cope with strokelimit
Oct 13 2011 | 7:21 am
I'm pondering my brain over this for quit some time and I can't seem to get it right.
I'm making a drawing program in which I use the stroke command in jit.gl.sketch. After a while this becomes very heavy on the computer because of the cmdlist.
In order to bypass this I was thinking of having only 60 or 70 points drawn, or until i send the stroke an endstroke command, copy what is on the sketch to a texture, texturize a videoplane (drawn in the same sketch) in the back and begin drawing again.
When the next endstroke command would come along, I would captre the whole sketch again, with the underlying videoplane texturized and the overlaying new stroke into the texture and so add (pixelwise) everything together.
I'm a bit lost on this, I can't seem to get the logic right on this and don't even know it is possible at all.
Could any of the jitter ninja's here guide me into the right direction?
I've tried with shaders too, but those are a bit out of my (programming) league.
Any help would be greatly appreciated.