breaking this issue out into it's own thread as I'd made another one a bit convoluted. Thanks to Petros' help here I have Cinder-Imgui working on Ubuntu. Sadly I get a seg fault when running the same code on a Pi.
This seems to happen in Cinder-Imgui's render() function which gets automatically called post Draw. I put some traces in this function and it seems to step through once successfully, but then on the second time through I get the seg fault at static auto timer = ci::Timer(true); which is odd as given this is static it shouldn't even get called the second time right?
Admittedly I am having a hard time debugging on the Pi, if anyone has any advice on better techniques than using a text editor to add traces, then rebuilding, running and monitoring those traces that would be great! Compile time a killer on the Pi!
Argh, sorry Petros - how embarrassing! I really appreciate you looking into this - can't wait to try those fixes!
I actually just found out that the person I am helping with this hadn't ordered the hardware, so have asked them to order a new Pi 3 and an Odroid XU4 to test first before we commit (we need 7 in total). I'll be sure to test all this code on those 2 platforms as well.
so I just got my hands on the changes in the pull request and rebuilt Cinder. The FBO now works perfectly (thanks!) but although I have Cinder-ImGui compiling and running (after commenting out the clip board code) it is not rendering anything to screen. I am getting no errors and don't understand the buffer issue enough to know if it's at fault. Any advice? This is enough to get a GUI window to display on Ubuntu or other platforms:
personally I have no experience with Cinder-ImGui as I haven't used it in the past but I did compile and run the Basic example that ships with the block and it renders for me on the Pi. I did not actually try the functionality of the block so I am not sure if it would work properly but it is not crashing and it is rendering objects for me with the buffer change.
Have you by any chance tried the Basic example ? If not could you maybe give it a try and see if it actually renders something on your side ?
I gave a proper try on the example that ships with Cinder-ImGui and there are a couple of issues that need to be fixed to get basic functionality going. Fortunately not something extreme.
First thing is that it seems that GL_STREAM_DRAW doesn't play nicely on the RPi2 ( check this issue for more info. ) so you would have to replace it on the Cinder-ImGui side with either GL_STATIC_DRAW or GL_DYNAMIC_DRAW. I tested it with GL_DYNAMIC_DRAW.
You just need to make the changes on this file ( its used for the creation and the buffering of the vbos ).
The second thing you would need is this PR. The mouse button modifiers are missing and this should fix it.
With these two things I got the basic functionality of the block going.