Start of OpenGL binding

Here’s the early results of an OpenGL binding for Gtk2Hs:
[img]
You can’t see from the screenshot but in the live program the cube spins about.

I’m using the OpenGL extension for Gtk+ called GtkGlExt. This only takes the place of the GLUT, we still use the existing HOpenGL binding for all the actual OpenGL stuff.

The code for the above example was adapted from Kenneth Hoste’s RotatingCube example (which he adapted from somewhere else).

The ‘gtkglext’ package is now included the development version of Gtk2Hs if you want to try it out.

darcs get http://haskell.org/gtk2hs/darcs/gtk2hs/

Comments are closed.