PyOpenGL Working on the Raspberry Pi

I decided to use a USB key root for the RPi, and with that got a standard Raspbian setup going.  The really nice thing is that the EGL, GLES, etc entry points all resolved properly with the same code used for Linux/MESA EGL and GLES, yay.

Thing is, without the broadcom graphics module they're a bit useless, as the EGL Native types are all BCM data-types (I can query configurations, etc, but I can't actually put anything up on screen). There's a Python wrapper for broadcom, but so far it's taken way too long even to get Cython installed to get that working. There are binaries for it, but they're for Python 2.6, not the standard Python 2.7 on the newer pi images.

Anyway, seems likely it will just work, as the libraries are found and seem to work as expected, but it's not going to get done today.

[Update] Okay, apparently I just can't accept failure, it's working now. I wrote a ctypes wrapper for the bits of the bcm library that we need, and with that I can run a simple render-a-triangle test on the RPI using EGL and GLES1 with just Python 2.7 and PyOpenGL (I'm also using numpy, but that's just for convenience). Would need all the various mouse/keyboard interaction and other bits in bcm (I assume that's where they are, anyway) to make it a useful tool, and that's not really something I'm all that interested in writing.  My goal was to get PyOpenGL to work on the RPi, and that seems to work fine.


Comments are closed.


Pingbacks are closed.