Re: gtk3, cairo, opengl, python2.7
Simon Sapin <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
Le 22/09/2012 13:43, Patrick Shirkey a écrit : > Hi, > > Can anyone point me to a simple example for this combination? > > gtk3, cairo, opengl, python2.7 Hi, PyGTK is only for GTK 2, so you need to use PyGObject 3.x for introspection for GTK 3: http://python-gtk-3-tutorial.readthedocs.org/en/latest/index.html This doc is new, so you may need to fall back on the C docs + a bit of guesswork: http://developer.gnome.org/gtk3/stable/ You may also needs to have introspection files for cairo so that PyGObject knows how to create pycairo objects. I’m not very familiar with GTK (I use Pango and cairo without GTK) but apparently the magic function is gdk_cairo_create which returns a cairo context: http://developer.gnome.org/gdk3/stable/gdk3-Cairo-Interaction.html#gdk-cairo-create As to OpenGL, I’m not sure what you mean. If you only want to draw in 2D with cairo, GTK chooses the backend so you don’t need to worry about it. For 3D stuff I don’t know. -- Simon Sapin -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo