Define "not getting painted properly". Are some objects drawn? Are some objects shaded? Is the aspect ratio wrong? And about all, what objects do you use for drawing?
When using multiple GLControls, you are using multiple GL contexts. Therefore, you have to switch to the right context before drawing, so in each GLControl PaintEvent handler you start with the desired control's MakeCurrent() function. If the sizes of the two controls differ, you have to adjust the viewport accordingly, too, with GL.Viewport(x, y, width, height).
There are some OpenGL objects that are bound to a context, e.g. the vertex array object (VAO). You can't use VAOs to draw in multiple contexts, but need to create an individual one from mutually used VBOs for each context you use.
Comments
Re: Two GLControls on one Form
Define "not getting painted properly". Are some objects drawn? Are some objects shaded? Is the aspect ratio wrong? And about all, what objects do you use for drawing?
When using multiple GLControls, you are using multiple GL contexts. Therefore, you have to switch to the right context before drawing, so in each GLControl PaintEvent handler you start with the desired control's MakeCurrent() function. If the sizes of the two controls differ, you have to adjust the viewport accordingly, too, with GL.Viewport(x, y, width, height).
There are some OpenGL objects that are bound to a context, e.g. the vertex array object (VAO). You can't use VAOs to draw in multiple contexts, but need to create an individual one from mutually used VBOs for each context you use.
Re: Two GLControls on one Form
Thanks mOfl!
MakeCurrent was the missing call!