Code re-work and content update: lighting.

This commit is contained in:
Joey de Vries
2017-05-30 19:23:56 +02:00
parent 18e5fdb443
commit 320db41e89
35 changed files with 347 additions and 168 deletions

View File

@@ -169,11 +169,11 @@ int main()
transform = glm::rotate(transform, (float)glfwGetTime(), glm::vec3(0.0f, 0.0f, 1.0f));
// get matrix's uniform location and set matrix
ourShader.use();
unsigned int transformLoc = glGetUniformLocation(ourShader.ID, "transform");
glUniformMatrix4fv(transformLoc, 1, GL_FALSE, glm::value_ptr(transform));
// render container
ourShader.use();
glBindVertexArray(VAO);
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, 0);