Pi and OpenGL?

  1. 7 months ago

    Ulrich B

    14 Jan 2019 Pre-Release Testers, Xojo Pro Europe (Germany, Berlin) · xo...

    I’ve been asked for a project where I would need to research more information than I currently have time for.
    Does anyone know if a Pi 3 is strong enough to display, say, a full screen 3D animation of a cube running videos on some of its sides?
    (And if so: Would some 3D wizard be willing to assist me (against payment) in doing so later this year?)

  2. Eugene D

    14 Jan 2019 Pre-Release Testers, Xojo Pro Canada scispec.ca

    Hi Ulrich,

    Unfortunately, the Raspberry Pi 3 B+ is not powerful enough to do what you asked with Xojo.

    I created a cube that was spinning, no video, no texture, and a simple filled square and measured the fastest frame rate that I could with OpenGL on Xojo (Example 6-1 from my OpenGL book with the modified ability to maximize the screen). The speed varied between 5-7 frames per second at full-screen on the Raspberry Pi. Running a video would require a frame rate of at least 20 frames per second for each side of the square. Processing two squares would require more processing cycles, and would lower the frame rate more.

    Sorry, the Raspberry Pi with Xojo isn't good enough to play a full screen animation of a cube running videos.

  3. Robin L

    14 Jan 2019 Xojo Inc Europe (Germany, Rehlingen)

    Could you generate a video of a rotating cube with its videos and play that?
    The video would have to be assembled a frame at a time but that is doable (not be me!).
    The downside is that it would not be interactive - you would not be able to control the cube rotation in real-time for example.

  4. Derk J

    15 Jan 2019 Pre-Release Testers, Xojo Pro
    Edited 7 months ago

    Should be possible:
    http://www.raspberryconnect.com/gamessoftware/item/314-trying_out_opengl_on_raspberry_pi_3

    Note that you may wanna set the video buffer higher and set the processor fequency in the boot config.

    I’m not an opengl guru but if xojo has opengl for pi it could as well be working the same.

  5. Ulrich B

    15 Jan 2019 Pre-Release Testers, Xojo Pro Europe (Germany, Berlin) · xo...

    Thanks all! Although I now have contradicting opinions – Derk’s link shows several games running at around 60 fps on a Pi, so a cube should definitely be smooth. @Eugene, did you enable the real hardware drivers like written in the article?

    @Robin, a prerendered video would not be possible, but maybe the customer can go with stills of the videos instead of playing ones. Which I would prefer anyway as this should be running all day and I am afraid even a fan could be insufficient to save the Pi(s) from an early dead then. I guess video decoding + openGLing would put a lot of stress on the system. Which is why I would rather not overclock the CPU.

  6. Robin L

    15 Jan 2019 Xojo Inc Europe (Germany, Rehlingen)

    https://hackaday.com/2013/07/20/water-cooled-raspberry-pi/ :)

  7. Ulrich B

    15 Jan 2019 Pre-Release Testers, Xojo Pro Europe (Germany, Berlin) · xo...
    Edited 7 months ago

    Yes. Ehm. Please don’t challenge my mechanical talents! I still remember the cemetery of Ataris I soldered to death.

  8. Andre K

    15 Jan 2019 Pre-Release Testers

    @Ulrich B still remember the cemetery of Ataris I soldered to death.

    That's a real crime ! ;)

  9. Eugene D

    15 Jan 2019 Pre-Release Testers, Xojo Pro Canada scispec.ca

    @Ulrich B @Eugene, did you enable the real hardware drivers like written in the article?

    No, I did not enable the OpenGL drivers that is mentioned in the article. I would love to try it, but I will not be near my development computer until Friday. Maybe someone else could try it? If not, then I will try it on Friday.

  10. Ulrich B

    15 Jan 2019 Pre-Release Testers, Xojo Pro Europe (Germany, Berlin) · xo...

    @Andre K That's a real crime ! ;)

    I was young and did not need the money :D

  11. Ivan T

    15 Jan 2019 Pre-Release Testers

    @Eugene D Sorry, the Raspberry Pi with Xojo isn't good enough to play a full screen animation of a cube running videos.

    There are lots of 3D games and educational 3D software running perfectly fine on the Pi Here you can see an example of a cube running videos on a Raspberry 1, yes, the first one:

    Video

    So, the raspberry 3 is MUCH more powerfull than that, it also has a dedicated Kernel Mode-Setting for OpenGL preinstalled in the latest OS.

    The poor frame rate problem is NOT in the hardware.

  12. Robin L

    16 Jan 2019 Xojo Inc Europe (Germany, Rehlingen)

    Ref: The 'Video' link in the previous post.

    The link to Luca Carlon's blogpost containing references to source code and other resources is a little hidden (click on 'More').
    This is the link: http://thebugfreeblog.blogspot.com/2012/12/decoding-and-rendering-to-texture-h264.html

    A rotating cube with video on the faces looks doable - given the video evidence.
    That video is 7 years old - so you have to work getting the code updated! :)

  13. Ulrich B

    16 Jan 2019 Pre-Release Testers, Xojo Pro Europe (Germany, Berlin) · xo...

    Thanks, @Robin! A lot to modernize, IMHO. The links just leads me to an empty example domain ;)

  14. Tim J

    17 Jan 2019 Pre-Release Testers, Xojo Pro Dehydrating in AZ

    If a Pi 3B can run videos 24/7 under the Kodi package, a rotating cube with some smallish rendered viewers running won't create a cooling problem. Just a basic Pi case with the heatsinks and a cooling fan are quite sufficient. I like this case/fan set for the 3B/3B+:

    https://www.amazon.com/dp/B07D3S4KBK/

  15. Andre K

    17 Jan 2019 Pre-Release Testers

    @Tim J I like this case/fan set for the 3B/3B+:

    I don't like it, see the description from Amazon: "(Not Compatible With the Latest Pi 3 B+) " in the header of the page.

  16. Ivan T

    17 Jan 2019 Pre-Release Testers

    @Andre K I don't like it, see the description from Amazon: "(Not Compatible With the Latest Pi 3 B+) " in the header of the page.

    The product has an option, to choose beetween "Pi 3B/2B" AND Pi 3 Model B+

  17. Eugene D

    17 Jan 2019 Pre-Release Testers, Xojo Pro Canada scispec.ca
    Edited 7 months ago

    I just made it back to my development computer and changed the Raspberry Pi configuration changes to see the change in performance.

    Following the directions at Raspberry Connect , the mesa-utils were installed by default on my Raspberry Pi 3 B+. I tried both Full KMS and Fake KMS settings and here are the results:

    Setting	                  Frames Per Second
    Default (No Move, Xojo)	     5-7
    	
    Fake KMS (GlxGears)	       60
    Fake KMS (Move Mouse, Xojo)	6
    Fake KMS (No Move, Xojo)	12
    	
    Full KMS (GlxGears)	       60
    Full KMS (Mouse Move, Xojo)	6
    Full KMS (No Move, Xojo)	12

    The Xojo program was just a cube rotating at full screen size. There was no texture, and no video running.
    Note: When I move the mouse over the OpenGLSurface control, then the frames per second decreases. There is a similar anomaly with OpenGLSurface on Windows.

  18. Derk J

    18 Jan 2019 Pre-Release Testers, Xojo Pro

    @Eugene D did you "sudo raspi-config" and tried the different OpenGL settings?

  19. Eugene D

    18 Jan 2019 Pre-Release Testers, Xojo Pro Canada scispec.ca

    @Derk J @Eugene D did you "sudo raspi-config" and tried the different OpenGL settings?

    Yes i did try different settings Derk. Thanks for asking.

  20. Rudolph T

    18 Jan 2019 Pre-Release Testers, Xojo Pro South Africa

    Just a thought. Why don't you just setup a server on the pi and then code the cube in three.js with videos. I Suppose you could connect this to a smart-tv or something running a browser. Could you provide more information about how you will display the cube ie. HDMI or an LCD Touch screen etc?

  21. Newer ›

or Sign Up to reply!