0
votes

I just want to make an OpenGL program using GLSL shader. But when I'm compiling it I have the following error message :

Version number not supported by GL2.

Here's my vertex shader code :

#version 400

in vec3 Color;
out vec4 FragColor;

void main() {
    FragColor = vec4(Color, 1.0);
}

My device config is the following :

GL render : ATI Radeo HD 4600 Series

GL version : 2.1.8787

GLSL version : 1.30

So I need opengl version 4.3 if it's possible. But I downloaded lots of versions but I didn't find the last one. Plus, I should have GLSL version 4. Does anyone know a link to download the last version of OpenGL?

2
Have you tried updating your drivers?Nicol Bolas
I put #version 330 (after new graphic drivers downloading) and it works. My GLSL version is 3.30 now. Thanks for your answer. Byeuser1364743

2 Answers

1
votes

GL render : ATI Radeo HD 4600 Series

The HD 4xxx series of graphics cards doesn't support OpenGL 4.x at all. They're limited to OpenGL 3.x. So download the latest available drivers (sadly, AMD stopped making new drivers for this card last year, so you'll be stuck with the 12.6's), and switch to version 3.30.

2
votes

As Nicol Bolas indicated, this is most likely due to generic or outdated drivers.

Does anyone know a link to download the last version of OpenGL?

OpenGL is not an traditional API with a centralized implementation but rather it is a specification of a feature set that multiple vendors (NVIDIA,AMD, etc..) implement. This allows specific vendors to utilize unique features of their graphics hardware while still providing programmers with a consistent, hardware independent API.

AMD's complete driver catalog can be queried here.