tomster1996's picture

Unable to find an entry point named 'glCreateShader' in DLL 'opengl32.dll'.

When i try to create a shader it seems that a function is missing from the opengl dll file.

When i compile this code:

class Shader
    {
        static string vertexSource = System.IO.File.ReadAllText("Resources/Shader/dirLightAmbDiffSpecPix.vert");
        static string fragSource = System.IO.File.ReadAllText("Resources/Shader/dirLightAmbDiffSpecPix.frag");
 
        public static void start()
        {
            int vert = GL.CreateShader(ShaderType.VertexShader);
            int frag = GL.CreateShader(ShaderType.FragmentShader);
            GL.CompileShader(vert);
            GL.CompileShader(frag);
            int prog = GL.CreateProgram();
            GL.AttachShader(prog, vert);
            GL.AttachShader(prog, frag);
            GL.UseProgram(prog);
        }
    }

I get this error message:
"Unable to find an entry point named 'glCreateShader' in DLL 'opengl32.dll'."

Whats going on here and how can i fix it?


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vgolubev's picture

Hallo!

I have same problem. I install latest drivers for my Intel GMA4500M (Windows 7).
"OpenGL Extensions Viewer" display:

Renderer: Mobile Intel(R) 4 Series Express Chipset Family
Vendor: Intel
Version: 2.1.0 - Build 8.15.10.2202
Shading language version: 1.20 - Intel Build 8.15.10.2202

But I still get error.
What is wrong?

P.S.: sorry for my english (I am russian).

the Fiddler's picture

I am testing on a GMA4500M and shaders seem to work more or less correctly. Try printing out:

Console.WriteLine(GL.GetString(StringName.Vendor));
Console.WriteLine(GL.GetString(StringName.Renderer));
Console.WriteLine(GL.GetString(StringName.Version));

from your program to see if you are getting hardware acceleration.

If you are using Tao (from OpenTK.Compatibility), you might be hitting a Tao-specific bug. Call Gl.LoadAll() to fix this.

vgolubev's picture
the Fiddler wrote:
Console.WriteLine(GL.GetString(StringName.Vendor));
Console.WriteLine(GL.GetString(StringName.Renderer));
Console.WriteLine(GL.GetString(StringName.Version));

Intel
Mobile Intel(R) 4 Series Express Chipset Family
2.1.0 - Build 8.15.10.2202

the Fiddler wrote:

If you are using Tao (from OpenTK.Compatibility), you might be hitting a Tao-specific bug. Call Gl.LoadAll() to fix this.

Yes. I use Tao framework 2.1.0. But where is no Gl.LoadAll(), but exists Gl.Load(). And this not help.

vgolubev's picture

I install OpenTK and use Tao from OpenTK.Compatibility. But i still get error.

the Fiddler's picture

Tao has an issue where it fails to load extensions (like glCreateShader) if you call any OpenGL functions before the context is created. Your drivers support shaders just fine, so it's just a matter of reloading extensions.

I haven't used Tao for a long time but try looking for something in the spirit of Gl.ReloadFunctions() or Gl.ReloadAll().

vgolubev's picture
the Fiddler wrote:

I haven't used Tao for a long time but try looking for something in the spirit of Gl.ReloadFunctions() or Gl.ReloadAll().

Yooohooo! I use Gl.ReloadFunctions() and functions for shaders work fine!
Thank you very much!!!

master2k's picture

having the same problem actally with my nvidia 560 ti

alanz2223's picture

I have a similar issue with a Mobile Intel 4 Series card where I get unable to find entry point glbindframebuffer in OpenGL32.dll i try to invoke gl.ReloadFunctions() but it doesn't appear with intellisence or any thing with gl.reload, I don't know what to do I'm using Windows OpenGl Monogame template in Visual Studio.