Is it possible to update image data at video speed?
Posted: Wed Jul 13, 2016 12:37 pm
I need to show a panoramic view inside my livecode app and I wish to overlay lines, rectangles, circles, polygons, etc. on top of the view using livecode itself.
I have currently implemented the code that generates the camera view in C++, by saving it to file and loading the image data directly into an existing image (with the same size) on my stack (using URL and "set the imagedata"). But even when I load the data from a RAM drive, it still takes almost a second to update the image on the screen in livecode.
If I would use my C++ code as an External lib, would it be possible to update the contents of an image object at video speed, or in some other way display it fast in the background so I can draw objects on top of it in livecode?
Or would I only be able to get a decent frame rate by assigning a viewport overlay, and drawing the necessary objects on top of the view from within my C++ code itself, rather than in livecode?
I have currently implemented the code that generates the camera view in C++, by saving it to file and loading the image data directly into an existing image (with the same size) on my stack (using URL and "set the imagedata"). But even when I load the data from a RAM drive, it still takes almost a second to update the image on the screen in livecode.
If I would use my C++ code as an External lib, would it be possible to update the contents of an image object at video speed, or in some other way display it fast in the background so I can draw objects on top of it in livecode?
Or would I only be able to get a decent frame rate by assigning a viewport overlay, and drawing the necessary objects on top of the view from within my C++ code itself, rather than in livecode?