Vladimír Vondruš
b811592407
python: fix compatibility with pybind11 < 2.6.
3 years ago
Vladimír Vondruš
d95c60942b
python: implement handling for custom trade.MeshAttribute values.
...
So it's possible to create them, print them and get the custom ID back.
Will be also used for SceneField and other yet-to-be-exposed enums.
3 years ago
Vladimír Vondruš
d75f31e854
python: expose new linear RGB(A) conversion APIs from Color.
3 years ago
Vladimír Vondruš
dddef56c87
python: adapt to Magnum changes.
...
Which means the API gets renamed, so a breaking change.
3 years ago
Vladimír Vondruš
a45fbb84da
python: handle Windows path insanities in the bindings directly.
...
Otherwise people wouldn't be able to conveniently use os.path, which is
an undesirable pain point. And do this for all currently exposed APIs,
not just the AbstractImporter that caused a problem.
This reverts commit 28497ec2ca .
3 years ago
Vladimír Vondruš
b3e24a11b4
python: reorder trade.MeshData APIs to have enum overloads first.
...
Because for some reason pybind11 on *some platforms* (or in some
configurations?) picks the integer overload even for enum arguments,
only because it's first in the overload set.
This is extremely brittle, but for now I don't know any better solution.
3 years ago
Vladimír Vondruš
5edd1a49f6
python: adapt the MeshData test to behavior on non-deprecated builds.
...
Sigh.
3 years ago
Vladimír Vondruš
c78cc3fd13
python: expose the BUILD_DEPRECATED constants as well.
...
Ugh, I thought I would never need them but then there are plugin
features depending on this and it's A MESS.
3 years ago
Vladimír Vondruš
28497ec2ca
python: no, using backward slashes IS NOT A GOOD IDEA, python!
3 years ago
Vladimír Vondruš
d106fc09d7
python: direct access to trade.MeshData indices and attributes.
...
In concrete types. Yes. Well, some of them for now, I still need to
sleep on normalized and matrix types, how it makes the most sense to
expose those. Oh, and array attributes as well.
3 years ago
Vladimír Vondruš
211bd5f0a8
python: mutable access to trade.MeshData raw index/vertex data.
...
Not much useful on its own, but it's a prep for what comes next.
3 years ago
Vladimír Vondruš
cca2eaf659
python: expose all index/attribute property queries in trade.MeshData.
...
Except for the actual data access, that'll be done next. Also updated
the mesh test file with more useful contents.
3 years ago
Vladimír Vondruš
ae5741e4d0
python: fix to build with pybind11 2.3.
...
I should probably reconsider supporting such old versions, but no time
for that now.
3 years ago
Vladimír Vondruš
27983b66ba
python: add a dedicated test for StridedArrayView of a dynamic type.
...
Yup, this could work very well for MeshData / SceneData generic
attribute and field access with what's already there, no changes needed.
3 years ago
Vladimír Vondruš
a3f88d4db4
python: adapt to std::string removal in the GL library.
...
I really need to figure out the String[View] -> py::string conversion,
this is awful.
3 years ago
Vladimír Vondruš
eb334e1d7f
python: use the new, shorter, Size and Stride typedefs.
3 years ago
Vladimír Vondruš
7ee0c7d949
python: fix build against latest Corrade.
...
Not sure what was I thinking there, with the const.
3 years ago
Vladimír Vondruš
f6d4385a44
python: add an API-breaking TODO for Application wrappers.
...
No need to use the Configuration class here, we got named arguments
instead.
3 years ago
Vladimír Vondruš
99a22dfcd5
python: adapt to Magnum changes.
...
The Shaders classes now take a Configuration class instead of a
hard-to-distinguish list of arguments. But in Python we have named
arguments, so none of that is necessary -- I only made the arguments
explicitly keyword-only but the interface stays the same.
4 years ago
Aaron Gokaslan
75be40300b
python: remove extra copy in gl.cpp
4 years ago
Vladimír Vondruš
734072bee3
python: doc++
...
Huh, why didn't I document the MeshData accessors at all?
4 years ago
Vladimír Vondruš
b983d29acf
python: avoid an assertion in trade.MeshData.index_count.
...
Emit a Python exception instead.
4 years ago
Vladimír Vondruš
7bd8bd965b
python: expose trade.MeshData.index_data and .vertex_data.
...
Useful for rudimentary data size stats queries, not much else as the
other APIs are not exposed yet.
4 years ago
Vladimír Vondruš
12950365e3
python: properly test trade.ImageData.data refcounting.
...
Was tested for the Image/ImageView classes but not here.
4 years ago
Vladimír Vondruš
bce7509e87
python: expose also platform.*.Application.dpi_scaling.
...
For some reason only window and framebuffer size was exposed but not
this. Made DPI-aware calculations impossible to do.
4 years ago
Vladimír Vondruš
41e3da6fb2
python: default the destructor also in the SDL2 application.
4 years ago
Aaron Gokaslan
f22d3777d5
Minor clang-tidy fixups in some of the newer magnum-bindings
4 years ago
Vladimír Vondruš
48b0015782
python: don't look for WindowlessGlxApplication on Apple platforms.
4 years ago
Vladimír Vondruš
1d662bcd48
CMake: add a MAGNUM_PYTHON_BINDINGS_STATIC_PLUGINS CMake option.
...
Similar to the new options for Magnum command-line utilities.
4 years ago
Vladimír Vondruš
3ce8b6d96e
python: add also windowless CGL application.
...
Not sure how I forgot this one.
4 years ago
Vladimír Vondruš
e4457383c6
python: properly expose the platform.wgl module.
4 years ago
Vladimír Vondruš
7362ff92dc
Adapt to Magnum changes.
4 years ago
Vladimír Vondruš
403689f3bf
python: skip GL text rendering test case on ES2.
...
Needs OES_mapbuffer but I don't have extension queries exposed yet.
4 years ago
Vladimír Vondruš
f4b5d915d9
python: bind also the vector shaders.
...
Last missing piece for the Python text example.
4 years ago
Vladimír Vondruš
9b60dd30b0
python: fix inconsistencies in bound Flat and Phong feature sets.
...
Phong has instancing and texture transformation so Flat should have that
too. Also fixed a bunch of doc omissions; there's no need to bind the
POSITION attribute the hard way either.
4 years ago
Vladimír Vondruš
c2499fea34
python: no need to bind draw() again for shader subclasses.
...
The inheritance takes care of that. On the other hand it makes docs
rather noisy, but that's another problem to fix.
4 years ago
Vladimír Vondruš
1ce696203e
python: TODOs.
4 years ago
Vladimír Vondruš
e6fdfd7d8e
python: expose the essentials from the Text library.
...
Everything needed to make a Python variant of the Text example. The
Oxygen.ttf font file is the same as in MagnumPlugins/FreeTypeFont/Test
in the magnum-plugins repository.
4 years ago
Vladimír Vondruš
716869599b
python: fix platform.Application.Configuration.title property getter.
...
Discovered this only after generating the docs, the StringView return
wasn't handled correctly. The tech debt TODO still stands, I need to
create StringView bindings already.
4 years ago
Vladimír Vondruš
04c1f712ed
python: adapt to Magnum changes in a less lazy way.
4 years ago
Vladimír Vondruš
62a07c38bc
python: adapt to Magnum changes.
4 years ago
Vladimír Vondruš
737ec6c415
Prefix all CMake options with MAGNUM_*.
4 years ago
Vladimír Vondruš
09e5e90426
python: CgltfImporter is deprecated, test with GltfImporter instead.
4 years ago
Vladimír Vondruš
ddfc5ccc36
python: adapt to STL string removal in Application classes.
...
A non-deprecated build didn't build anymore.
4 years ago
Aaron Gokaslan
ca5e16f658
python: avoid some unnecessary object copies.
4 years ago
Vladimír Vondruš
a79bc39f3e
python: ability to import images and meshes by name.
4 years ago
Vladimír Vondruš
831631e10e
python: properly test also image import level OOB checks.
4 years ago
Vladimír Vondruš
ea4e353231
python: work around GCC 4.8 being utterly confused.
4 years ago
Vladimír Vondruš
c2e2a8e520
python: expose basics of trade.AbstractSceneConverter.
4 years ago
Vladimír Vondruš
da21863ac7
python: exposed basics of trade.AbstractImageConverter.
4 years ago