dwmkerr / sharpgl

Use OpenGL in .NET applications. SharpGL wraps all modern OpenGL features and offers a powerful scene graph to aid development.
MIT License
755 stars 299 forks source link

Dropping the OpenGLControl onto a form in design view does nothing in SharpDevelop #114

Open ghost opened 9 years ago

ghost commented 9 years ago

First off I'm not sure if this is actually a sharpGL issue or a SharpDevelop issue.

I was trying to create a basic WinForms application to help get some OpenGL experience. I can get the SharpGL NuGet packages installed with no problems and I can run the sample programs that come with SharpGL but when I create a new project and drop the OpenGLControl onto the form nothing happens. I was expecting to see a control icon appear on, or underneath, the form and see some code get added to the designer.cs file. Unfortunately neither of these happened.

I tried opening the forms from the sample programs in design view but this causes SharpDevelop to display an exception regarding Serialisation / Deserialisation, this particular part I think may be a SharpDevelop and I'll also raise a bug report there:

Failed to load designer. Check the source code for syntax errors and check if all references are available.

ICSharpCode.FormsDesigner.FormsDesignerLoadException: System.ComponentModel.Design.Serialization.CodeDomSerializerException: Could not find type '?'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.

System.ComponentModel.Design.Serialization.CodeDomSerializerException: The variable 'openGLControl1' is either undeclared or was never assigned. at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression) at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

at ICSharpCode.FormsDesigner.FormsDesignerViewContent.LoadDesigner() at ICSharpCode.FormsDesigner.FormsDesignerViewContent.LoadAndDisplayDesigner() at ICSharpCode.FormsDesigner.FormsDesignerViewContent.LoadInternal(OpenedFile file, Stream stream) at ICSharpCode.SharpDevelop.Workbench.AbstractViewContentHandlingLoadErrors.Load(OpenedFile file, Stream stream)

I'm using SharpDevelop 5.1