giawa / gui4opengl4csharp

A simple graphical user interface package for the OpenGL 4 C# library.
MIT License
60 stars 17 forks source link

System.EntryPointNotFoundException: Unable to find an entry point named 'glGenBuffers' in DLL 'opengl32.dll' #2

Closed Atennop1 closed 1 year ago

Atennop1 commented 1 year ago

Good afternoon. For the second day I can not solve the problem with this library. I tried to use it in a working project and in an empty one - everywhere the same result. Error when trying to display text: System.EntryPointNotFoundException: Unable to find an entry point named 'glGenBuffers' in DLL 'opengl32.dll'

After some time of googling, it became clear that such an error appears due to the lack of the necessary methods in opengl32.dll. That's all I know about this error and I don't know how to fix it.

Screenshot of full stacktrace: image

Screenshot of code: image

I hope this helps you solve this problem. If necessary, I can throw off the entire project as an archive and files .fnt and .png

Best regards, Atennop

giawa commented 1 year ago

Hi there,

Unfortunately, this usually means that the OpenGL implementation you are using does not support the minimum requirements of this library. This could be due to your GPU drivers, or if you are running this in a VM/slimmed down OS you may not have these methods available to you. At a minimum you will need to be using a system that supports OpenGL 4.

Hopefully this helps with solving the issue! Cheers,

Atennop1 commented 1 year ago

It is very strange. I'm using Windows 10, GeForce RTX 3060 Ti graphics card and the latest driver for it. The OpenGL Viewer contains the following data:

image

After some time of searching, I realized that although OpenGL 4.6 version is on my system, but it is not used. The library uses the standard implementation of OpenGL from Windows - opengl32.dll, which only supports version 1.1. Therefore, it does not contain the functions required for the library. The question is why does the library use opengl32.dll instead of nvoglv32.dll with Nvidia's OpenGL implementation?

giawa commented 11 months ago

Hey there,

That's very strange. My understanding is that Windows should automatically work out how to bind thru opengl32.dll into the GPU provided implementation. If it didn't, then that would mean every game/graphics application/etc would need to have separate code paths and bindings for each GPU implementation of OpenGL. I am not sure why your nvidia OpenGL methods are unavailable when using opengl32.dll. Have you tried a similar C# library such as OpenTK to see if the bindings work there? OpenTK also uses opengl32.dll (as do all C# libraries as far as I know).

Good luck,