I use vao and vbo to draw a quad. A vertex shader has the following input:
layout (location = 0) in vec3 pos
I would like to use glVertexAttrib3f to set a constant pos value for the vertex shader. The following code has no effect (the quad is drawing):
glVertexAttrib3f(0, 0.0f, 0.0f, 0.0f);
glUseProgram(shaderProgram);
glBindVertexArray(VAO);
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0);
What is wrong ?