hello.
I don't understand the use in opengl of the
glVertexAttribPointer(glGetAttribLocation(shaderPr ogram1, "VertexPosition"), 3, GL_FLOAT, GL_FALSE, sizeof(Vertexes), BUFFER_OFFSET(sizeof(float) * 3));
and of the
glEnableVertexAttribArray(glGetAttribLocation(shad erProgram1, "VertexPosition"));
what do they precisely?
are relative to the shader or to the vbo?
because I have a vboarray and i wish use it for many render call
i would do:
,i must call glVertexAttribPointer and glEnableVertexAttribArray for each different shader?Code ://1) first use of the vboarray with shaderProgram1 glUseProgram(shaderProgram1); glBindVertexArray(vboarray); glDrawArrays(GL_TRIANGLES, 0, TOTAL_VERTICES); //1) second use of the vboarray with shaderProgram2 glUseProgram(shaderProgram2) glBindVertexArray(vboarray); glDrawArrays(GL_TRIANGLES, 0, TOTAL_VERTICES);
thanks.



