Click here to Skip to main content
15,886,783 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When using OpenTK control for .NET on Winforms, the control is instantiated from designer.cs file
C#
this.glControl = new GLControl();

but this creates a control with default Graphics mode. To enable Anti-aliasing I need to use an overload of the constructor which is
C#
//Arguments for Graphics Mode- Color_Format, Depth, Stencil, Sampling
this.glControl = new GLControl(new OpenTK.Graphics.GraphicsMode(32, 24, 0, 8));

But when I change the code on the designer.cs file to use the overloaded constructor, Visual studio designer does not load form but returns an error - "overload not found or the constructor does not take arguments of type...", but when I ignore it does not load the control on designer, but the project builds and runs perfectly. How can I make Visual studio to identify the overloaded constructor?

Note: Graphics mode property is immutable.
Posted
Updated 5-Jan-15 0:48am
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900