mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
Code re-work and content update: lighting.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user