Reputation: 3073
Say I want to test shader code of an older version, which is GLSL 1.2. The GPU on the machine actually can support GLSL 4.0 (from the hardware specification).
Upvotes: 1
Views: 128
Reputation: 3264
Yes, you should be able to run shaders for a lower version.
Just make sure to identify the glsl version the code is written against in the very first line of every shader source, e.g. #version 120
The OpenGL context should also use the compatibility profile, the core profile does not contain deprecated functionality.
Upvotes: 1
Reputation: 72392
You need to create an OpenGL context in compatibility mode, which probably is the default.
Upvotes: 0