opentk / GLControl

WinForms control for OpenTK 4.x.
https://opentk.net
Other
54 stars 24 forks source link

Add support for .NET 5 and OpenTK 4.7.5+ #30

Closed softwareantics closed 11 months ago

softwareantics commented 1 year ago

Expected Behavior

I would assume given support for .NET Core 3.1 that .NET 5.0 support would also be possible.

Current Behavior

Right now, whenever I create a GLControl (through the designer or in code-behind) I get the following exceptions:

Through designer: image

Through code-behind: unknown

Workaround

I don't really know of any that will give me the same result.

Failure Information (for bugs)

I'm hoping the issue is simply just versioning of TK or .NET. Further investigation is required.

Steps to Reproduce

  1. Create a .NET 5 project.
  2. Reference GLControl and OpenTK 4.7.5+
  3. Add it to a form.
  4. The exception should be thrown.
  5. Remove it from the form, attempt to create it via code-behind.
  6. Place a break point after the class has been instantiated and check to see if Context property threw an exception.

Context

Below is further context on my project configuration just in case:

NogginBops commented 1 year ago

This should be fixed with #26, I just haven't been able to make a release in the past. Soon I'll make a push for a new release of this nuget package. In the meantime I guess the workaround suggested in #25 could work, or you could try building the project yourself.

ghost commented 1 year ago

Can you release update so we can use latest opentk 4 in .NET 7?

Thanks

NogginBops commented 1 year ago

This control already works with OpenTK and .net 7. Unfortunately the nuget package that supports that has the "wrong" name. It can be found here: https://www.nuget.org/packages/OpenTK.WinForms/4.0.0-pre.6 . If you find some incompatibility between GLControl while using OpenTK 4 and .net 7 please open an issue with the details.

I've been meaning to make a proper release of this repo some time and when I do it's going to be named https://www.nuget.org/packages/OpenTK.GLControl as expected. But that has not happened yet.

ghost commented 1 year ago

Thanks!

I found it in visual studio, I have to enable 'include prerelease' I hope you make the release soon, because this way a lot of people will get confused! (including me)

NogginBops commented 11 months ago

This issue should be fixed with 4.0.0-pre.7.