MutterOberin's picture

GLControl

Hey!

If I use the GLControl and Request OpenGL Version I got a 2.1.2 There was somewhere written that a solution is to Build a CustomGLControl like

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)
    { }
}

There are Problems with this. If I do so, the CustomGLControl is listed in the Toolbox, when I want to use it, VisualStudio complains about something and tells that this element will be removed. So I cant use it.

My Solution is a hack: Open the OpenTK Source and change the Std Constructor for GLControl to something else. If I do so with 3.0 for example nothing is drawn in my window anymore but I get Version 3.0. If I type something which is not possible like 4.2 Everything is drawn AND I get the Version 4.1 back, which reflects the capability of my Graphics Card (GTX 570)

Do I miss something? Is this a bug?

Regards
MutterOberin