I'm following a tutorial on shader done using Visual Studio... I'm using Xcode on ElCapitan.
My readShaderCode() function pass the shaderCode files content ( vertex.glsl and fragment.glsl ) to the console --just to make sure-- along with the OpenGL version .
So this code works on Windows but not on my machine ! I can't see what the problem is and if somebody could figure it out for me I would really appreciate it! Thanks. And thanks for all the posts that have been helping me along for sometimes now :)
Here is the output:
Working with OpenGl: 2.1 INTEL-10.14.66
Here is the shader Code:
#version 120
#extension GL_ARB_separate_shader_objects : enable
in layout(location=0) vec2 position;
in layout(location=1) vec3 vertexColor;
out vec3 theColor;
void main() {
gl_Position = vec4(position, 0.0, 1.0);
theColor = vertexColor;
}
*****************************************
Working with OpenGl: 2.1 INTEL-10.14.66
Here is the shader Code:
#version 120
#extension GL_ARB_separate_shader_objects : enable
out vec4 daColor;
in vec3 theColor;
void main() {
daColor = vec4(theColor, 1.0);
}
*****************************************
WARNING: 0:2: extension 'GL_ARB_separate_shader_objects' is not supported
ERROR: 0:4: '(' : syntax error: syntax error