1

when I try to compile a glsl shader with OpenGL in Ubuntu I get the following error: - 0:1(10): error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, and 1.00 ES

But when I do a "glxinfo | grep OpenGL" it says:

OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD JUNIPER
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.1.3
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 10.1.3
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:

It appears that the glsl version is right, so I don't know what am I doing wrong

I am developing with lwjgl and Java

mcat
  • 67
  • 1
  • 5

1 Answers1

3

This is basically telling you that you don't have a core profile context. Mesa is giving you a 3.0 context since it does not support compatibility profiles, and I imagine this is because you did not explicitly ask the framework you used to create your context for a core profile.

Update:

Given lwjgl, when you create your context you need to request a 3.3 core profile.

You can do that like this:

PixelFormat    pixelFormat       = new PixelFormat ();
ContextAttribs contextAtrributes = new ContextAttribs (3, 3).withProfileCore (true);

[...]

Display.create (pixelFormat, contextAtrributes);
Community
  • 1
  • 1
Andon M. Coleman
  • 42,359
  • 2
  • 81
  • 106
  • I'm using lwjgl and Java – mcat Sep 20 '14 at 17:46
  • It don't crash anymore, but it doesn't render anything while in Windows does. Will investigate by myself and mark this as solved, thanks – mcat Sep 20 '14 at 18:03
  • Your code probably relies on something deprecated then. You might want to run it through gDEBugger and see if it generates any deprecation warnings. – Andon M. Coleman Sep 20 '14 at 18:16
  • This solution worked for me(c++ users). You may need to install a proper additional driver such NVIDIA-331 or else,then restart your computer,with a [ g++ -L/usr/lib/nvidia-331/ your-file.cc -lglut -lGLEW -lGL ] compile option to compile your file. – wangdq Nov 27 '14 at 12:58