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:

Mono, OpenGL and GTK#

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

相关文章:

  • 2021-05-05
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
  • 2021-06-05
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-24
  • 2021-07-21
  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案