I want to change the color of the sinusoyda. 
For this, I made the loading of masterpieces (fragmentary and vertex) in the function where I draw the sine wave, and change the color in the fragment shader.
ShaderProgram shaderProgram; shaderProgram.loadShaders("basic.vert", "basic.frag"); shaderProgram.use(); shaderProgram.setUniform("vertColor", glm::vec4(1.0f, 1.0f, 1.0f, 1.0f)); // изменил цвет basic.vert
#version 330 core layout (location = 0) in vec3 pos; void main() { gl_Position = vec4(pos.x, pos.y, pos.z, 1.0); }; basic.frag
#version 330 core out vec4 frag_color; void main() { frag_color = vec4(0.35f, 0.96f, 0.3f, 1.0f); }; But for some reason it does not work.

uniform'vertColorin the shader. - HolyBlackCatshaderProgram.setUniform("frag_color", glm::vec4(1.0f, 1.0f, 1.0f, 1.0f));but earned. How do i fix the shader ?? Just from the examples I have only this option:#version 330 coreuniform vec4 vertColor; out vec4 frag_color; void main() {frag_color = vertColor;}uniform vec4 vertColor; out vec4 frag_color; void main() {frag_color = vertColor;}uniform vec4 vertColor; out vec4 frag_color; void main() {frag_color = vertColor;}I don’t understand what to write in the shader. - timob256setUniform("frag_color"will not work, becausefrag_coloris not uniform. "I just have the following example from examples: ..." In theory, it should work. Did you try it? - HolyBlackCatshaderProgram.setUniform("vertColor", glm::vec4(1.0f, 1.0f, 1.0f, 1.0f));. - HolyBlackCat