Support setting program uniform by location

This commit is contained in:
Nikita Lisitsa 2021-07-13 11:54:22 +03:00
parent d73ce27c32
commit 0af7e8f274
2 changed files with 6 additions and 0 deletions

View file

@ -112,6 +112,7 @@ namespace psemek::gfx
};
uniform_proxy operator[] (std::string_view name) const;
uniform_proxy operator[] (GLint location) const;
private:
GLuint program_;

View file

@ -382,4 +382,9 @@ namespace psemek::gfx
return {location(name)};
}
program::uniform_proxy program::operator[] (GLint location) const
{
return {location};
}
}