Object now follows the behaviour of Shader

This commit is contained in:
Robert 2021-01-21 01:12:25 +01:00
parent 4fe91a12e2
commit 87b27eae70
7 changed files with 32 additions and 19 deletions

View file

@ -66,7 +66,7 @@ int main(int argc, char** argv)
return -1;
}
oglu::Object square(vertices, sizeof(vertices), indices, sizeof(indices), topology, sizeof(topology));
oglu::Object square = oglu::MakeObject(vertices, sizeof(vertices), indices, sizeof(indices), topology, sizeof(topology));
while (!glfwWindowShouldClose(window))
{
@ -76,7 +76,7 @@ int main(int argc, char** argv)
shader->SetUniform("ourColor", &oglu::Color::Transparent);
shader->Use();
square.BindAndDraw();
square->BindAndDraw();
glfwSwapBuffers(window);
glfwPollEvents();