diff --git a/src/python/magnum/shaders.cpp b/src/python/magnum/shaders.cpp index 2772fbd..17e6721 100644 --- a/src/python/magnum/shaders.cpp +++ b/src/python/magnum/shaders.cpp @@ -211,7 +211,7 @@ void shaders(py::module& m) { &Shaders::Phong::setNormalMatrix, "Set normal matrix") .def_property("projection_matrix", nullptr, &Shaders::Phong::setProjectionMatrix, "Set projection matrix") - .def_property("light_positions", nullptr, [](Shaders::Phong& self, const std::vector& positions) { + .def_property("light_positions", nullptr, [](Shaders::Phong& self, const std::vector& positions) { if(positions.size() != self.lightCount()) { PyErr_Format(PyExc_ValueError, "expected %u items but got %u", self.lightCount(), UnsignedInt(positions.size())); throw py::error_already_set{}; @@ -219,7 +219,7 @@ void shaders(py::module& m) { self.setLightPositions(positions); }, "Light positions") - .def_property("light_colors", nullptr, [](Shaders::Phong& self, const std::vector& colors) { + .def_property("light_colors", nullptr, [](Shaders::Phong& self, const std::vector& colors) { if(colors.size() != self.lightCount()) { PyErr_Format(PyExc_ValueError, "expected %u items but got %u", self.lightCount(), UnsignedInt(colors.size())); throw py::error_already_set{}; diff --git a/src/python/magnum/test/test_shaders_gl.py b/src/python/magnum/test/test_shaders_gl.py index 84d9a23..09bcf9f 100644 --- a/src/python/magnum/test/test_shaders_gl.py +++ b/src/python/magnum/test/test_shaders_gl.py @@ -89,8 +89,8 @@ class Phong(GLTestCase): a.diffuse_color = (0.5, 1.0, 0.9) a.transformation_matrix = Matrix4.translation(Vector3.x_axis()) a.projection_matrix = Matrix4.zero_init() - a.light_positions = [(0.5, 1.0, 0.3), Vector3()] - a.light_colors = [Color4(), Color4()] + a.light_positions = [(0.5, 1.0, 0.3, 1.0), Vector4()] + a.light_colors = [Color3(), Color3()] a.alpha_mask = 0.3 texture = gl.Texture2D()