Drawing with vectors and memory managament

Hi, Im building a simple drawing game - trying to go through this code: http://developer.coronalabs.com/code/easy-finger-drawing-undo-functionality.

I have some flash background and when developing similar flash app - instead of drawing with vectors I would draw inside bitmapdata - thus no matter how much I draw, performance would never suffer even If I kept drawing for weeks - bitmap is still a bitmap. With vectors its of course different the more vectors I draw the more memory is consumed and after a while app becomes unresponisve.

Is there some way how to overcome this in Corona - is there a way how to turn vectors into bitmaps or manipulate pixels instead of drawing with vectors? Otherwise it seems impossible in corona to create a drawing app that wouldn’t crash eventually - run out of memory… 

Hmm… I guse not http://forums.coronalabs.com/topic/16902-pixel-manipulation-in-corona/  - its a sad and beautiful world…

Hi @fjofuzz,

I think you may be able to accomplish this using snapshots (render to texture). Here’s a few links regarding this feature:

http://docs.coronalabs.com/guide/graphics/snapshot.html

http://www.coronalabs.com/blog/2013/10/22/tutorial-snapshots-in-graphics-2-0/

Hope this helps somewhat,

Brent Sorrentino

@Brent Sorrentino, thanks that looks very promising - will give it a try - if I choose Pro package one day.

Hmm… I guse not http://forums.coronalabs.com/topic/16902-pixel-manipulation-in-corona/  - its a sad and beautiful world…

Hi @fjofuzz,

I think you may be able to accomplish this using snapshots (render to texture). Here’s a few links regarding this feature:

http://docs.coronalabs.com/guide/graphics/snapshot.html

http://www.coronalabs.com/blog/2013/10/22/tutorial-snapshots-in-graphics-2-0/

Hope this helps somewhat,

Brent Sorrentino

@Brent Sorrentino, thanks that looks very promising - will give it a try - if I choose Pro package one day.