I’m trying to send glUniform1i as always, but for some reason glGetAttribLocation returns -1
С++:
glUseProgram(pomehi.GetShaderID());
int loc = glGetAttribLocation(pomehi.GetShaderID(), "line");
glUniform1i(loc, 2);
GLSL:
out vec4 cvetPiks;
uniform int line;
void main()
{
vec3 col = vec3(0.f, 0.f, 0.f, 1.f);
if (line == 2)
{
col = vec3(1.f);
}
cvetPiks = vec4(col, 1.0);
}
OpengGL does not generate errors, but for some reason it does not return the attribute location, what should I do in this case?