Fix rectangular matrix uniforms

This commit is contained in:
Nikita Lisitsa 2020-10-23 17:13:04 +03:00
parent 9cea478859
commit da445a869a

View file

@ -156,17 +156,17 @@ namespace psemek::gfx
void program::uniform_proxy::operator = (geom::matrix<float, 2, 3> const & m)
{
gl::UniformMatrix2x3fv(location_, 1, gl::TRUE_, m.coords);
gl::UniformMatrix3x2fv(location_, 1, gl::TRUE_, m.coords);
}
void program::uniform_proxy::operator = (geom::matrix<float, 2, 4> const & m)
{
gl::UniformMatrix2x4fv(location_, 1, gl::TRUE_, m.coords);
gl::UniformMatrix4x2fv(location_, 1, gl::TRUE_, m.coords);
}
void program::uniform_proxy::operator = (geom::matrix<float, 3, 2> const & m)
{
gl::UniformMatrix3x2fv(location_, 1, gl::TRUE_, m.coords);
gl::UniformMatrix2x3fv(location_, 1, gl::TRUE_, m.coords);
}
void program::uniform_proxy::operator = (geom::matrix<float, 3, 3> const & m)
@ -176,17 +176,17 @@ namespace psemek::gfx
void program::uniform_proxy::operator = (geom::matrix<float, 3, 4> const & m)
{
gl::UniformMatrix3x4fv(location_, 1, gl::TRUE_, m.coords);
gl::UniformMatrix4x3fv(location_, 1, gl::TRUE_, m.coords);
}
void program::uniform_proxy::operator = (geom::matrix<float, 4, 2> const & m)
{
gl::UniformMatrix4x2fv(location_, 1, gl::TRUE_, m.coords);
gl::UniformMatrix2x4fv(location_, 1, gl::TRUE_, m.coords);
}
void program::uniform_proxy::operator = (geom::matrix<float, 4, 3> const & m)
{
gl::UniformMatrix4x3fv(location_, 1, gl::TRUE_, m.coords);
gl::UniformMatrix3x4fv(location_, 1, gl::TRUE_, m.coords);
}
void program::uniform_proxy::operator = (geom::matrix<float, 4, 4> const & m)