[General Questions]
As such, is roughly analogous to SlimDX, SDL or GLFW.
// OpenTK.Graphics code: GL.Begin(BeginMode.Points); GL.Color3(Color.Yellow); GL.Vertex3(Vector3.Up); GL.End();
// Tao.OpenGl code: Gl.glBegin(Gl.GL_POINTS); Gl.glColor3ub(255, 255, 0); Gl.glVertex3f(0, 1, 0); Gl.glEnd();
The code is trivial, but it illustrates the difference nicely: OpenTK removes unecessary cruft ('gl', 'ub', 'f'), uses strongly-typed enums ('BeginMode') and integrates better with .Net ('Color').
There are other differences not so readily apparent: OpenTK will not allow you to pass invalid data to OpenGL (wrong tokens or non-valuetype data); it plays better with intellisense (inline documentation, overloads, strong-types); it checks for OpenGL errors automatically in debug builds.
All these become more important as a project grows in size.
[Windows.Forms & GLControl Questions]
myForm.TopMost = true; myForm.FormBorderStyle = FormBorderStyle.None; myForm.WindowState = FormWindowState.Maximized;
class CustomGLControl : GLControl { // 32bpp color, 24bpp z-depth, 8bpp stencil and 4x antialiasing // OpenGL version is major=3, minor=0 public CustomGLControl() : base(new GraphicsMode(32, 24, 8, 4), 3, 0, GraphicsContextFlags.ForwardCompatible) { } }
[Graphics questions]