Spent the day on OLPCGames today. I'm trying to clean up the code so that the various pieces can be used independently to let people code for the OLPC without giving up portability (and I was hoping, to get GTK totally out of the picture for people not using the GTK-based features, so that you could just run a top-level Pygame window).
So far it's not going all that well. GStreamer, it turns out, is a GObject-based technology, so the video and camera modules are basically wedded to a GTK event-loop. Mesh I already knew would be, but I'd thought those two would be easily separable.
I can replace the camera code with a sub-process running gst-launch, but the video is tied pretty strongly (not a huge loss, without GTK you could only do full-screen display anyway). PangoFont is wedded to the GTK/Cairo/Pango environment. SVGSprite needs Cairo, but should be otherwise pretty independent, but so far it's about the only non-GTK-dependent feature.
At the moment I have a thread that can run in the background to run a gtk event loop and , but I'll have to figure out some way to signal to it that the pygame mainloop has exited in order to prevent hanging or core-dumping. Given that much of the benefit is now gone (since you're almost always going to wind up loading GTK anyway), I may just revert the changes and go back to assuming the embedded operation when you use OLPCGames.
Pingbacks are closed.