OpenGL does not allow 'mediump' after 'inout'

Hello,

at the moment I’m writing some GLSL shaders.
These shaders are for the OpenGL 4.1 core profile and should be compatible with OpenGL ES 2.0.

mediump in vec3 normalVector;

This is an excerpt from one of my vertex shaders.
This works fine in Linux.
The same shader in Windows throws the error

OpenGL does not allow ‘inout’ after ‘mediump’

If I switch the order of the qualifiers to

in mediump vec3 normalVector;

it works in Windows but throws the opposite error message in Linux.

OpenGL does not allow ‘mediump’ after ‘inout’

I use a nVidia card with driver version 280.13 with Linux and the newest current driver for Windows.

What am I doing wrong?
What is the correct order for the qualifiers?
Any ideas?

Thanx in advance,
TheAvatar

According to the GLSL 4.1 spec, the precision qualifier should come after the parameter-qualifier (in, out, etc). So the Windows driver seems to be correct here.

Thanks for clearing that up.

Yesterday, I upgraded my Linux drivers to 295.x and now Windows and Linux show the same precision qualifier preference.
So it actually seems to be a driver-related issue with the 280 driver for Linux.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.