Mono, OpenGL and GTK#

If you want to integrate OpenGL in your C# based Application you currently only have the option to use either FreeGLUT, SDL or the GtkGlArea Widget. In this example i show you how to use the GtkGlAreaSharp Widget to create the necessary OpenGL context and draw to it using Tao.OpenGl. Additionally we will insert a GTK Slider Widget to adjust the Zoom Level (using glTranslate)

In the end it should look like:

Please note that you have to satisfy some dependencies to make this work:

  • Tao.OpenGl (included) (=> Installed native OpenGL libraries required)
  • Tao.FreeGlut (included) (=> Installed native FreeGlut library required)
  • GtkGlAreaSharp (included) (=> Installed native GtkGlArea library required)

Download the Monodevelop Source here: gtkglareasharptest

posted @ 2009-10-17 22:16  与时俱进  阅读(1050)  评论(0编辑  收藏  举报
友情链接:同里老宅院民居客栈