luca-piccioni / OpenGL.Net

Modern OpenGL bindings for C#.
MIT License
567 stars 107 forks source link

Changing to NVIDIA GeForce GTX 1650 causes initialisation fail #149

Closed powerpete closed 4 years ago

powerpete commented 4 years ago

Before I've worked with the Intel onboard Graphic Cards. OpenGL.net has worked well. Now I've installed a NVIDIA GeForce GTX 1650 (and more RAM).

When I startup my application and open the windows which will use the OpenGL namespace, the application will crash. I'm getting an AccessViolationException while accessing the OpenGL Namespace. Callstack indicated by debugger:

OpenGL.Egl.GetDisplay(System.IntPtr)
OpenGL.Egl.Initialize()
OpenGL.Egl.Egl() 

With Native Code Debugging I'm getting also some additional Information: there are some access violations reading at 0x0000000 ...

In addition: I've tried to create a simple Project with OpenGL.net and OpenGL.net.WinForms. Adding the GlControl to the Form will crash Visual Studio. Can not continue ...

My Versions: OpenGL.net: 0.8.4 OpenGL.net.WinForms: 0.8.4 .NET Framework 4.6.1 Visaul Studio 2019 Win 10 Enterprise Running on a GeForce GTX 1650/PCIe/SSE2 from NVIDIA Corporation OpenGL version 4.6.0 NVIDIA 441.66 is supported

luca-piccioni commented 4 years ago

Setup environment variable OPENGL_NET_EGL_STATIC_INIT to NO, as it is soecified in the wiki section. It will be fine.

powerpete commented 4 years ago

Now initialisation will work again. Thanks.