My shader program keeps failing to link.
This is my shader source code:
const char* vertexShaderSource =
"#version 440 core\n"
"layout (location = 0) in vec3 aPos;\n"
"void main() {\n"
"gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);\n"
"}\0";
const char* fragmentShaderSource =
"#version 440 core\n"
"out vec4 FragColor;\n"
"void main() {\n"
"FragColor = vec4(1.0f, 0.5f, 0.2f, 1.0f);\n"
"}\0";
const char* fragmentShaderSource2 =
"#version 440 core\n"
"out vec4 FragColor;\n"
"void main() {\n"
"FragColor = vec4(1.0f, 1.0f, 0.0f, 1.0f);\n"
"}\0";
This is where I compile and link(I have two separate shader programs - one for green and one for yellow fragment shaders): https://pastebin.com/zZgvgq4q
The yellow fragment shader compiles ok but the the yellowshaderprogram fails to link.
Pls let me know how to fix the issue.
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.