Added convenience function to add texture to shader

This commit is contained in:
Robert 2021-01-21 16:40:00 +01:00
parent f1f076acf4
commit 1c008b1c9d
3 changed files with 42 additions and 5 deletions

View file

@ -86,12 +86,9 @@ int main(int argc, char** argv)
oglu::ClearScreen(GL_COLOR_BUFFER_BIT, oglu::Color(0.29f, 0.13f, 0.23f));
crate->BindAs(0);
opengl->BindAs(1);
shader->Use();
shader->SetUniform("texture1", 0);
shader->SetUniform("texture2", 1);
shader->SetUniform("texture1", crate, 0);
shader->SetUniform("texture2", opengl, 1);
square->BindAndDraw();