Extension function xy not supported

Mar 2, 2015 at 11:15 AM

first of all thank you for this great lib, it helps me very much taking my first steps in OpenGL on Windows!

The problem I currently have is this:
  • when I create a WinForms-application (VS 2012) and try to use something like this ...:
  shader = new ShaderProgram();
  shader.Create(gl, ...);
... I get the error "Extension function glCreateShader not supported". (printing control.OpenGLVersion gives "OpenGL2_1").
  • Ok, I thought this must be something with OpenGL-version or gfx-card-driver. But, interestingly the same statements work ok when I create a WPF-application and issue the same statements there. (I checked the OpenGLVersion and it is the same as above)
Do you have an explanation for this?

(I tried to set OpenGLVersion in the WinForms-application to 1,5, 2.0, 3.0, 4.5 with the same result).

Kind regards
Jan 24 at 2:49 AM
Edited Jan 24 at 2:51 AM
Your error is showing that you are trying to run the OpenGL 2.1 version. Shaders do not work unless you have OpenGL 3.0 and newer.

If you are getting the same error with 3.0 and 4.5... then its probably because you are using the word Shader, change the name to something else. I ran into this problem and I changed the name and everything works. Apparently SharpGL uses Shader as one of their words, so I can't use it. I had to use another name for my own variable name.

On another note, it could simply be that your video card is too old and you need to update. So it's a number of things that could be going on here. Lot of people who use older laptops do not realize that their video card only supports UP TO 2.1 of OpenGL. So if you are using an older laptop, that is your answer right there. And shaders do not work on older versions of OpenGL.