Using geomerative and glvideo causing unresponsive program only on fullScreen
Closed this issue · 1 comments
Jackieh111 commented
The following code runs fine on my OSx (using processing.video) environment but when I run it on raspberry pi (with glvideo) and pi camera the program frequently becomes unresponsive when I try to use fullscreen. The problem is somehow related to the rendering of the SVG file but I can't diagnose further. When I hardcode the screen size to almost the monitor size it works fine so I don't think it is a CPU problem. FrameRate is only 5.
gohai commented
I tested it against the next version of the library (to be released soon), and found the framerate to be 5 fps as you said.
However I don't think there is a bug or anything the library could do differently to make it faster:
- the sketch requests a camera image of what will effectively be 800x480 pixels, 25 times a second
- each time one of these frames is available, the code has to retrieve the texture and loop over 384000 elements because of the
loadPixels
call - and finally, the drawing in GL and the video decoding will most likely just step on each other's feet - but there's nothing we can do there (I was told GLES2 has less fine-grained synchronization mechanisms than desktop GL, where this might be less of a problem)
Things I'd try out
- reduce the size of the frame you request from the camera, and especially the framerate (if you're only rendering 5 fps, you don't need the decoding overhead of 25)
- try to find ways around the
loadPixels
- or don't do it for every frame