static-sites/bases/do-blog/resources/documents/python/gtk3/tutorial15.py

37 lines
1.8 KiB
Python
Executable File

#+BEGIN_COMMENT
.. title: GTK-3 Simple opengl app with touch events
.. slug: 15-gtk3-opengl-touch-events
.. date: 2014-06-10 12:00:00 UTC
.. tags: GTK-3, python, widgets, touchscreen, opengl
.. category: python
.. description: Example application mixing gtk, opengl and touch, written as a demo but also as an opengl testing enviroment.
.. type: text
#+END_COMMENT
#+CAPTION: Opengl touch events
[[../../../images/gtk/tut14-touchscreen-events.png]]
"""This is a much more complicated example which mashes some of the previous examples together, I have written it as an example but also to test out shaders and different pipelines to get better opengl performance.""")
web.page.section(web.paragraph.render())
web.paragraph.create(
"""Hopefully this example will help you get started writing awesome touch based apps with gtk, if anything is unclear let me know in the comments below.""")
web.page.section(web.paragraph.render())
web.link.create('Launchpad','OpenGL in a drawing area','http://bazaar.launchpad.net/~oly/python-examples/trunk/files/head:/python-examples/gtk3/')
web.link.create('Launchpad','Touch screen events','http://bazaar.launchpad.net/~oly/python-examples/trunk/files/head:/python-examples/gtk3/')
web.pre.create(load(os.path.abspath('./content/gtk3/tut15/tut15-opengl-touch-app-01.py')))
web.page.section(web.pre.render())
web.paragraph.create(
"""The file below is a simple helper to reduce the size of the files, it contains the shader and a point and cube class used in the main program above.""")
web.page.section(web.paragraph.render())
web.pre.create(load(os.path.abspath('./content/gtk3/tut15/helper.py')))
web.page.section(web.pre.render())