Search code examples
c#opengltao-framework

How to use c# windows as glut window?


I want to display GlutSolidSphere in c# window. I am using Tao Framework. Since you have to create GlutWindow to display the Glut Objects. I do not want to create this GlutWindow but I want to use c# window to display Glut Objects. How can I do this?


Solution

  • You need to create an OpenGL context on the window. You can do this via Tao.SimpleOpenGlControl (windows-only) or OpenTK.GLControl (cross-platform).

    As datenwolf suggested, once you have an OpenGL context you can render GLUT shapes at will.