Error compiling version of OpenGL shader

I had a problem compiling a simple vertex shader in OpenGL, I get the following error messages:

  • error (# 106) Version number not supported by GL2
  • error (# 279) Invalid classifier layout 'location'

I suppose I should use the wrong version of GL2, but I have no idea how to find my version number or where to upgrade (and yes, I tried to find the answer.) A copy of my shader code is included for reference only and my openGL information.

#version 330 core layout(location = 0) in vec3 Position; void main() { gl_Position.xyz = Position; } 
  • Supplier: ATI Technologies Inc.
  • Renderer: ATI Radeon HD 5700 Series
  • Version: 3.2.9756 Context profile compatibility
+4
source share
1 answer
 #version 330 core 

This suggests that your shader uses GLSL version 3.30.

It:

Version: 3.2.9756 Context profile compatibility

Means your version of OpenGL is 3.2. The GLSL version corresponding to OpenGL 3.2 is 1.50. This is less than 3.30. Consequently, the lack of compilation.

Update your drivers; they are very old. Your card must support GL 4.2.

+8
source

Source: https://habr.com/ru/post/1436712/


All Articles