Vladimír Vondruš
2d1022b739
python: rename a header for further additions.
7 years ago
Vladimír Vondruš
bfdfad1226
python: expose GL::Renderer::setClearColor().
...
Uh oh, something's weird there.
7 years ago
Vladimír Vondruš
59969c3f67
python: expose (Mutable)ImageView.
7 years ago
Vladimír Vondruš
d5379c10eb
python: expose buffer objects owned by gl.Mesh.
...
Makes testing much easier.
7 years ago
Vladimír Vondruš
a18c438352
python: so we need MutableStridedArrayView4D as well.
...
In order to access pixel data in 3D images, of course.
7 years ago
Vladimír Vondruš
f1aeb0fd0e
python: whoops, forgot to bind some MutableStridedArrayView3D functions.
7 years ago
Vladimír Vondruš
1e4a9c424e
python: bind PixelFormat and PixelStorage.
...
Just the uncompressed ones for now.
7 years ago
Vladimír Vondruš
3dcb176c80
python: bind Math::Range.
7 years ago
Vladimír Vondruš
90778c0a0b
package: GCC 9 and lcov from git work again.
...
And GCC 6 doesn't, so kill it. However the thing is even slower than
before, how the heck is that possible.
7 years ago
Vladimír Vondruš
2d2d6d5762
magnum: one more test to really check all variants.
7 years ago
Vladimír Vondruš
d157b55637
magnum: again (and hopefully for the last time) reorder constructors.
...
The order should be (and now is):
1. magnum's own conversion constructors (double from integer and such)
2. stuff like implicit color3 -> color4, if applicable
3. buffer protocol constructors
4. general "init from a tuple" constructors last, because they're the
slowest
7 years ago
Vladimír Vondruš
c2ac530fc2
python: additions to the math benchmark.
7 years ago
Vladimír Vondruš
22a17cb5b8
python: slightly improve perf of __getitem__ on matrices/vectors.
...
Also test them properly. The full optimization is waiting for a pybind
PR to get merged.
7 years ago
Vladimír Vondruš
d4dff647f7
python: these are done.
7 years ago
Vladimír Vondruš
0170dea8f4
python: consolidate buffer-related headers.
7 years ago
Vladimír Vondruš
d1d6cb9ec0
python/magum/math: switch to our own buffer protocol implementation.
...
Also don't needlessly define buffer protocol again for subclasses (such
as Matrix3 or Color4) as the base can handle that just fine.
7 years ago
Vladimír Vondruš
f9a2146142
python/corrade: remove TODOs that are impossible.
7 years ago
Vladimír Vondruš
ce3d2564fd
python/corrade: make our own buffer protocol for array views.
...
THe one from pybind11 is severely limited and allocation-happy. Lots of
tech debt and TODOs resolved now, yay.
7 years ago
Vladimír Vondruš
c261dd1e8c
python: this is about to get upstreamed.
7 years ago
Vladimír Vondruš
a61ee59825
doc: setup for symbol search.
7 years ago
Vladimír Vondruš
3d78371d57
Add file encoding to .editorconfig.
7 years ago
Vladimír Vondruš
881be9b985
modules: updated FindMagnum.cmake.
7 years ago
Vladimír Vondruš
7549d107de
python: implement buffer protocol for Vector types as well.
...
This makes Vector3 to np.array conversion about 20x faster. Yes, *that*
much. Crazy. Timings from the benchmark added in previous commit before:
np.array([]) 0.66096 µs
np.array([1.0, 2.0, 3.0]) 0.70623 µs
a = array.array("f", [1.0, 2.0, 3.0]); np.array(a) 0.57877 µs
a = Vector3(1.0, 2.0, 3.0); np.array(a) 18.18542 µs
after:
np.array([]) 0.57162 µs
np.array([1.0, 2.0, 3.0]) 0.68309 µs
a = array.array("f", [1.0, 2.0, 3.0]); np.array(a) 0.53958 µs
a = Vector3(1.0, 2.0, 3.0); np.array(a) 0.74818 µs
There's still some overhead that could be removed I think, making the
Vector3-to-numpy conversion faster than list-to-numpy.
7 years ago
Vladimír Vondruš
6f6f6dacba
python: benchmark math / numpy / buffer protocol things.
...
Lots of optimization opportunities here. In particular, the conversion
of Vector3 to np.array is *crazy slow*, turns out to be caused mainly by
the overhead of exception throwing in pybind11. In case of Matrix3 to
np.array conversion there's no such overhead because the buffer protocol
takes care of that.
Another thing is that pybind11 buffer protocol interface has a
relatively large overhead compared to e.g. python's own array.array. I
blame the unneded allocations.
7 years ago
Vladimír Vondruš
700fd7c510
python: doc++
7 years ago
Vladimír Vondruš
b3a06f62e6
python: expose the new Matrix4::perspectiveProjection() overload.
7 years ago
Vladimír Vondruš
7fba2a030e
python: test at least the temporary property.
7 years ago
Vladimír Vondruš
fc3990b4bd
package/ci: remove dead commented-out stuff.
7 years ago
Vladimír Vondruš
aae98e0f02
python: remove pybind11 2.2.4 workarounds.
7 years ago
Vladimír Vondruš
e4aa19884a
package/ci: use pybind11 2.3.0.
7 years ago
Vladimír Vondruš
a38b14870f
python: use writeonly properties for shader uniform setters.
...
This practically means we depend on pybind11 2.3 now.
7 years ago
Vladimír Vondruš
ee2a209e9c
doc: adapt to m.css changes.
7 years ago
Vladimír Vondruš
e5e0ac0e36
doc: hmm, why corrade.containers were automagically included before?
7 years ago
Vladimír Vondruš
8b60643058
Added .editorconfig.
...
Huh, how did I miss this here.
7 years ago
Vladimír Vondruš
58e1b3c5d9
python: make scenegraph features actually instantiable from python.
7 years ago
Vladimír Vondruš
39f2699b90
python: more yelling at the buildsystem.
7 years ago
Vladimír Vondruš
7474e22ce1
python: TODAY I AM THE ANGRY GUY YELLING AT COMPUTERS.
7 years ago
Vladimír Vondruš
f66594f36b
python: setuptools why are you so flimsy.
7 years ago
Vladimír Vondruš
6d30c5ddd7
python: make setup.py work even if imported from elsewhere.
...
I feel like I'm stepping into unknown waters here :D
7 years ago
Vladimír Vondruš
daac3ac5f4
Make the Find module usable with a CMake subproject.
7 years ago
Vladimír Vondruš
c1f854472d
package/ci: test the static build as well.
7 years ago
Vladimír Vondruš
d050145e51
python: put everything into a single module if magnum is built statically.
...
That makes it much easier to handle in that case (because that's the
whole point of static builds) and also nicely circumvents any issues
with duplicated global data when a static lib would be linked to
multiple dynamic libraries.
7 years ago
Vladimír Vondruš
21ee51fd96
python: do as little as possible in PYBIND11_MODULE.
7 years ago
Vladimír Vondruš
6adc330e39
python: minor cleanup.
7 years ago
Vladimír Vondruš
d0d028f72d
python: make the main bindings _magnum, not magnum._magnum.
7 years ago
Vladimír Vondruš
8b9146dc78
package: added Homebrew package.
7 years ago
Vladimír Vondruš
e9b5fb0019
modules: added FindMagnumBindings.cmake for finding the helper headers.
7 years ago
Vladimír Vondruš
d5b5b55d2f
python: make sure all Matrix static constructors return proper type.
...
And test for those.
7 years ago
Vladimír Vondruš
2cfb061d7b
python: expose TRS SceneGraph implementation.
7 years ago
Vladimír Vondruš
52a0650cd2
python: expose at least underscored Matrix[34]._translation property.
...
Still need to figure out a way to expose the property with the same name
as a static function, but this has to suffice for now.
7 years ago