Added convenience function to add texture to shader
This commit is contained in:
parent
f1f076acf4
commit
1c008b1c9d
3 changed files with 42 additions and 5 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue