Updated example
This commit is contained in:
parent
16db47760c
commit
4c3c1687ef
|
@ -88,7 +88,7 @@ int main(int argc, char** argv)
|
||||||
oglu::Texture opengl = oglu::MakeTexture("assets/opengl.png");
|
oglu::Texture opengl = oglu::MakeTexture("assets/opengl.png");
|
||||||
|
|
||||||
glm::mat4 view = glm::mat4(1.0f);
|
glm::mat4 view = glm::mat4(1.0f);
|
||||||
view = glm::translate(view, glm::vec3(0.0f, 0.0f, -3.0f));
|
view = glm::translate(view, glm::vec3(0.0f, 0.0f, -5.0f));
|
||||||
|
|
||||||
glm::mat4 projection;
|
glm::mat4 projection;
|
||||||
projection = glm::perspective(glm::radians(45.f), 1.0f, 0.1f, 100.0f);
|
projection = glm::perspective(glm::radians(45.f), 1.0f, 0.1f, 100.0f);
|
||||||
|
@ -103,6 +103,8 @@ int main(int argc, char** argv)
|
||||||
square.Rotate(6.0f, 0.0f, 0.0f);
|
square.Rotate(6.0f, 0.0f, 0.0f);
|
||||||
square2.Rotate(-6.0f, 0.0f, 0.0f);
|
square2.Rotate(-6.0f, 0.0f, 0.0f);
|
||||||
|
|
||||||
|
view = glm::rotate(view, glm::radians(1.0f), glm::vec3(0.0f, 1.0f, 0.0f));
|
||||||
|
|
||||||
shader->Use();
|
shader->Use();
|
||||||
shader->SetUniform("texture1", crate, 0);
|
shader->SetUniform("texture1", crate, 0);
|
||||||
shader->SetUniform("texture2", opengl, 1);
|
shader->SetUniform("texture2", opengl, 1);
|
||||||
|
|
Loading…
Reference in a new issue