Support setting program uniform by location
This commit is contained in:
parent
d73ce27c32
commit
0af7e8f274
2 changed files with 6 additions and 0 deletions
|
|
@ -112,6 +112,7 @@ namespace psemek::gfx
|
|||
};
|
||||
|
||||
uniform_proxy operator[] (std::string_view name) const;
|
||||
uniform_proxy operator[] (GLint location) const;
|
||||
|
||||
private:
|
||||
GLuint program_;
|
||||
|
|
|
|||
|
|
@ -382,4 +382,9 @@ namespace psemek::gfx
|
|||
return {location(name)};
|
||||
}
|
||||
|
||||
program::uniform_proxy program::operator[] (GLint location) const
|
||||
{
|
||||
return {location};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue