diff --git a/src/python/magnum/gl.cpp b/src/python/magnum/gl.cpp index 72108b3..5f45fb8 100644 --- a/src/python/magnum/gl.cpp +++ b/src/python/magnum/gl.cpp @@ -1059,6 +1059,7 @@ void gl(py::module& m) { /** @todo compressed formats */ PyNonDestructibleClass{m, "AbstractTexture", "Base for textures"} + .def_static("unbind", static_cast(&GL::AbstractTexture::unbind), "Unbind any texture from given texture unit") /** @todo limits */ .def_property_readonly("id", &GL::AbstractTexture::id, "OpenGL texture ID") /** @todo list-taking bind */ diff --git a/src/python/magnum/test/test_gl_gl.py b/src/python/magnum/test/test_gl_gl.py index 90da61e..0ae2373 100644 --- a/src/python/magnum/test/test_gl_gl.py +++ b/src/python/magnum/test/test_gl_gl.py @@ -311,6 +311,10 @@ class Shader(GLTestCase): with self.assertRaisesRegex(RuntimeError, "compilation failed"): a.compile() +class AbstractTexture(GLTestCase): + def test_unbind(self): + gl.AbstractTexture.unbind(3) + class Texture(GLTestCase): def test_minification_filter(self): a = gl.Texture2D()