Search code examples
c#openglglslopentk

OpenGL GLSL not suported 3.30


My shader has "#version 330 core" on first line but it says

0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES

And there is output from console after running "glxinfo | grep 'version'"

OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.2.2
OpenGL core profile shading language version string: 3.30
OpenGL version string: 3.0 Mesa 11.2.2
OpenGL shading language version string: 1.30

EDIT: I know it says "shading language 1.3" but it too says "core shading language 3.30"

PS: I am using C# and OpenTK


Solution

  • Solved. I had to change my constructor to

    using(GameWindow window = new GameWindow(800, 600, GraphicsMode.Default, "...", GameWindowFlags.Default, DisplayDevice.Default, 3, 3, GraphicsContextFlags.ForwardCompatible))
    

    PS: This helped