[cairo] gtk3, cairo, opengl, python2.7

Patrick Shirkey pshirkey at boosthardware.com
Sat Sep 22 14:29:07 PDT 2012


On Sun, September 23, 2012 1:15 am, Jonas Kulla wrote:
> 2012/9/22 Simon Sapin <simon.sapin at exyr.org>
>
>>
>> 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
>>
>>
> Just a small note: as GTK3 has fully transitioned to cairo internally,
> you will receive a cairo context in the draw-event (formerly
> "expose-event") callback,
> so you can use that directly.


Thanks for your advice.

I am specifically looking for an example that has cairo + opengl with
python2.7 and gtk3 :-)

I have code for cairo+python2.7+gtk3 and that is working well for me but I
have a requirement for loading opengl too and my research suggests that
leveraging cairo for this is one of the options.

I am also working on pyclutter, gtkglext and if neccessary sdl options
too. I am just trying to find the most efficient and portable method.




--
Patrick Shirkey
Boost Hardware Ltd


More information about the cairo mailing list