Open tpimh opened 2 years ago
I think the problem is actually with my Windows machine, because I have tried a lot of different combinations of libraries, tried building with MINGW and MSVC, and all produced binaries fail exactly the same. Also, tried precompiled version by @zYg-sys, same result. Not really sure what I am missing, as other OpenGL software runs just fine.
Hi @tpimh .
It could be a problem with the video card driver on your machine. It has been reported that some default drivers on Windows only support older versions of OpenGL. Try to update the drivers with the official version of the video card manufacturer.
The OpenGL version used in CadZinho is 3.2. It's the same one used in Blender 3D, if you want to test another application.
Another possible cause, which I think is unlikely, is the incompatibility of the GLEW DLL, which may have been compiled for another architecture.
Yes, this was the case! I checked, and my OpenGL version showed OpenGL 1.1, which after the driver update became 3.3, and CadZinho started just fine. I will update the title of the issue now.
Maybe it's a good idea to implement an OpenGL version check before trying to create context? glGetString(GL_VERSION) should be easy to parse, but maybe there is a way to get major and minor versions separately.
I have tried to build CadZinho with MSVC (VS2019 for both x64 and x86). These are the libraries that I was using:
The executable launches, but crashes with this error:
With a debugger, I figured out that this is the exact line that crashes: https://github.com/zecruel/CadZinho/blob/843a0643115bff043473d1fac5a9c0d12a2f2977/src/draw_gl.c#L54
How can I debug further to provide valuable information?