Add bool uniforms
This commit is contained in:
parent
ec36942f7d
commit
9cea478859
2 changed files with 6 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ namespace psemek::gfx
|
|||
|
||||
GLint location() const { return location_; }
|
||||
|
||||
void operator = (bool b);
|
||||
void operator = (int i);
|
||||
void operator = (unsigned int i);
|
||||
void operator = (float f);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,11 @@
|
|||
namespace psemek::gfx
|
||||
{
|
||||
|
||||
void program::uniform_proxy::operator = (bool b)
|
||||
{
|
||||
gl::Uniform1i(location_, b ? 1 : 0);
|
||||
}
|
||||
|
||||
void program::uniform_proxy::operator = (int i)
|
||||
{
|
||||
gl::Uniform1i(location_, i);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue