Browse Source

python: added gl.AbstractTexture.unbind().

pull/9/head
Vladimír Vondruš 6 years ago
parent
commit
c560b8085a
  1. 1
      src/python/magnum/gl.cpp
  2. 4
      src/python/magnum/test/test_gl_gl.py

1
src/python/magnum/gl.cpp

@ -1059,6 +1059,7 @@ void gl(py::module& m) {
/** @todo compressed formats */
PyNonDestructibleClass<GL::AbstractTexture>{m, "AbstractTexture", "Base for textures"}
.def_static("unbind", static_cast<void(*)(Int)>(&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 */

4
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()

Loading…
Cancel
Save