diff --git a/libs/gfx/include/psemek/gfx/program.hpp b/libs/gfx/include/psemek/gfx/program.hpp index 633210c4..8f233f7b 100644 --- a/libs/gfx/include/psemek/gfx/program.hpp +++ b/libs/gfx/include/psemek/gfx/program.hpp @@ -112,6 +112,7 @@ namespace psemek::gfx }; uniform_proxy operator[] (std::string_view name) const; + uniform_proxy operator[] (GLint location) const; private: GLuint program_; diff --git a/libs/gfx/source/program.cpp b/libs/gfx/source/program.cpp index 1bd6a8aa..e3d35643 100644 --- a/libs/gfx/source/program.cpp +++ b/libs/gfx/source/program.cpp @@ -382,4 +382,9 @@ namespace psemek::gfx return {location(name)}; } + program::uniform_proxy program::operator[] (GLint location) const + { + return {location}; + } + }