I started picking up OpenGL by using http://www.opengl-tutorial.org.
It uses following code to load and compile shaders (Linked because code is too long for this post and I think it's something with my shaders)
When running this code, it prints out "ERROR: Compiled Vertex Shader is corrupt" and "ERROR: Compiled Fragment Shader is corrupt". My shaders are following
Vertex Shader
#version 330 core
out vec3 color;
void main(){
color = vec3(1,0,0);
}
Fragment shader
#version 330
layout (location = 0) in vec3 position;
void main()
{
gl_Position.xyz = position;
gl_Position.w = 1.0;
}
I'm using XCode 5.1.1 , OpenGL 3.3 and GLSL 3.30.
It would be awesome if you guys could help me past this point. I got stuck on a YouTube tutorial that didn't use VAO's, so I went to learn these things myself so I could write the tutorial in my own code.
Thanks in advance