Browse Source

magnum: no_create() constructors are useless, don't add them.

pull/8/head
Vladimír Vondruš 7 years ago
parent
commit
bbbda61f6e
  1. 18
      doc/python/magnum.gl.rst
  2. 5
      src/python/magnum/gl.cpp

18
doc/python/magnum.gl.rst

@ -23,8 +23,26 @@
DEALINGS IN THE SOFTWARE. DEALINGS IN THE SOFTWARE.
.. ..
.. py:module:: magnum.gl
TODO: remove this once m.css stops ignoring the first caption on a page
#######################################################################
`NoCreate constructors`_
========================
.. TODO: link to NoCreate once m.dox handles variables properly
Compared to C++, the Python APIs don't have an alternative to the
:dox:`NoCreate <NoCreateT>` constructor tag. In C++ these make it possible
to have class members initialized before a GL context is present, but in
Python there's no such limitation so these don't make sense.
.. py:class:: magnum.gl.Mesh .. py:class:: magnum.gl.Mesh
TODO: remove this once m.css stops ignoring the first caption on a page
#######################################################################
`Buffer ownership and reference counting`_ `Buffer ownership and reference counting`_
========================================== ==========================================

5
src/python/magnum/gl.cpp

@ -187,11 +187,6 @@ void gl(py::module& m) {
abstractShaderProgram abstractShaderProgram
/** @todo limit queries */ /** @todo limit queries */
/* Constructors */
.def_static("no_create", []() {
return PyAbstractShaderProgram{NoCreate};
}, "Construct without creating the underlying OpenGL object")
.def(py::init(), "Constructor") .def(py::init(), "Constructor")
/* Public interface */ /* Public interface */

Loading…
Cancel
Save