From bfdfad1226c30b4d19e469a21dc334fc39e82a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 25 Jul 2019 17:41:38 +0200 Subject: [PATCH] python: expose GL::Renderer::setClearColor(). Uh oh, something's weird there. --- src/python/magnum/gl.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/python/magnum/gl.cpp b/src/python/magnum/gl.cpp index f2b89cd..591e449 100644 --- a/src/python/magnum/gl.cpp +++ b/src/python/magnum/gl.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include "corrade/PyArrayView.h" #include "corrade/EnumOperators.h" @@ -298,7 +299,13 @@ void gl(py::module& m) { renderer .def_static("enable", GL::Renderer::enable, "Enable a feature") .def_static("disable", GL::Renderer::disable, "Disable a feature") - .def_static("set_feature", GL::Renderer::setFeature, "Enable or disable a feature"); + .def_static("set_feature", GL::Renderer::setFeature, "Enable or disable a feature") + + .def_property_static("clear_color", nullptr, + [](py::object, const Color4& color) { + /** @todo why can't it be just a single param? */ + GL::Renderer::setClearColor(color); + }, "Set clear color"); } }