https://github.com/NSchertler/GeneralizedMotorcycleGraph
Revision ebd9979c9a23db6f8fa7ed0167965a7ad432bb76 authored by Nico Schertler on 05 April 2017, 08:16:54 UTC, committed by Nico Schertler on 05 April 2017, 08:16:54 UTC
# Conflicts: # src/common.cpp # src/screen.cpp
Tip revision: ebd9979c9a23db6f8fa7ed0167965a7ad432bb76 authored by Nico Schertler on 05 April 2017, 08:16:54 UTC
Merge remote-tracking branch 'upstream/master'
Merge remote-tracking branch 'upstream/master'
Tip revision: ebd9979
glcanvas.cpp
#ifdef NANOGUI_PYTHON
#include "python.h"
class PyGLCanvas : public GLCanvas {
public:
using GLCanvas::GLCanvas;
NANOGUI_WIDGET_OVERLOADS(GLCanvas);
void drawGL() {
PYBIND11_OVERLOAD(void, GLCanvas, drawGL);
}
};
void register_glcanvas(py::module &m) {
py::class_<GLCanvas, Widget, ref<GLCanvas>, PyGLCanvas> glcanvas(m, "GLCanvas", D(GLCanvas));
glcanvas
.def(py::init<Widget *>(), py::arg("parent"), D(GLCanvas, GLCanvas))
.def("backgroundColor", &GLCanvas::backgroundColor, D(GLCanvas, backgroundColor))
.def("setBackgroundColor", &GLCanvas::setBackgroundColor, D(GLCanvas, setBackgroundColor))
.def("drawBorder", &GLCanvas::drawBorder, D(GLCanvas, drawBorder))
.def("setDrawBorder", &GLCanvas::setDrawBorder, D(GLCanvas, setDrawBorder))
.def("drawGL", &GLCanvas::drawGL, D(GLCanvas, drawGL));
}
#endif
Computing file changes ...