Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch the GlControl to OpenGl.Net.WinForms_net461 with running exception #146

Open
stevenmbiz opened this issue Oct 19, 2019 · 5 comments

Comments

@stevenmbiz
Copy link

Switch to use the WinForms_net461 GlControl for my project because I need newer version 4.6.1 .net framework to work for assimpNet skeleton animation import. I also switch both OpenGl.net.dll and OpenGl.net.winforms.dll references in visual studio 2017 to newer _net461 versions. When running the project, a exception occurred:
OpenGL.GlException: 'invalid enumeration' at CheckErrors function at startup.

Do I have to set the GlControl to something when using newer 4.6.1 framework?

@PhilT
Copy link

PhilT commented Nov 6, 2019

I'm seeing this error as well. Did you find a solution?

@stevenmbiz
Copy link
Author

No, I've look at another solution now.

@luca-piccioni
Copy link
Owner

If the exceptions are raised at initialization, they are masked with a try catch. This is quite normal on non-NVIDIA hardware: essentially the framework is trying to get the implementation limits using glGet, but the enumeration is not recognized (but it should since the relative GL extension is declared as supported).

If it happens during debugging in Visual Studio, just uncheck the option "break when... is user handled" to avoid the annoying breaks.

@PhilT
Copy link

PhilT commented Nov 6, 2019

That's got it, thanks @luca-piccioni. Triangle is doing a funny dance but it's working. Now to take another stab at getting the .NET Core version working. Any tips would be appreciated.

@PhilT
Copy link

PhilT commented Nov 6, 2019

I do have an NVIDIA card but it's my laptop so must be picking the default Intel card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants