Vladimír Vondruš
f59d8bb9b6
python: test trade.AbstractImporter.image2d() by name.
...
And a failure of the by-name API.
3 years ago
Vladimír Vondruš
8ccd378870
python: test trade.AbstractImporter.mesh() failure.
3 years ago
Vladimír Vondruš
47226d22f6
python: test also named AbstractImporter APIs with no file opened.
...
Code coverage says red!
3 years ago
Vladimír Vondruš
c0c78d83f5
python: ... and compatibility with pybind11 < 2.6.2 as well.
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š
5edd1a49f6
python: adapt the MeshData test to behavior on non-deprecated builds.
...
Sigh.
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š
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
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š
3ce8b6d96e
python: add also windowless CGL application.
...
Not sure how I forgot this one.
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š
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š
62a07c38bc
python: adapt to Magnum changes.
4 years ago
Vladimír Vondruš
09e5e90426
python: CgltfImporter is deprecated, test with GltfImporter instead.
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š
c2e2a8e520
python: expose basics of trade.AbstractSceneConverter.
4 years ago
Vladimír Vondruš
da21863ac7
python: exposed basics of trade.AbstractImageConverter.
4 years ago
Vladimír Vondruš
fda9e34b9d
python: use CgltfImporter instead of TinyGltfImporter in tests.
...
It compiles significantly faster and there's no time to waste these
days!!
4 years ago
Vladimír Vondruš
a325f3d0c1
python: minor, doc++, add TODOs.
4 years ago
Vladimír Vondruš
8e8a03e175
python: use AssertionError for trade.AbstractImporter usage errors.
...
Because using RuntimeError conflates with import failures. Also update
and fix docs to not show ValueError for where IndexError should be.
4 years ago
Vladimír Vondruš
2295f43873
Updated copyright year.
4 years ago
James Murphy
6f260b05cd
python: expose gl.Framebuffer.attach_texture().
...
Co-authored-by: Vladimír Vondruš <mosra@centrum.cz>
4 years ago
Vladimír Vondruš
1dd625a420
python: test gl.Framebuffer renderbuffer refcounting properly.
4 years ago
Vladimír Vondruš
75a0564cc3
python: make it possible to set mesh index buffer.
...
Heh, funny how this is not there yet.
4 years ago
Vladimír Vondruš
0120b3f768
python: add remaining vector/scalar, exp and other math functions.
...
Except for binomial coefficient, there the asserts are hard to replicate
and would need a change on Magnum side.
4 years ago
Aaron Gokaslan
c50a2f6851
python: add bindings for convenience color functions.
...
Co-authored-by: Vladimír Vondruš <mosra@centrum.cz>
5 years ago
Vladimír Vondruš
431074a776
python: adapt to GL shader renaming.
5 years ago
Vladimír Vondruš
cbb5358efd
python: apparently I can't name functions from(), hah.
5 years ago
Vladimír Vondruš
c51928c07e
python: expose gl.Context.
...
It's a bit involved as we need to ensure that gl.Context.current doesn't
outline the Application instance, so we need to:
- remember the Application object when it gets constructed (and clear
it again when it gets destructed)
- in gl.Context.current check if there's an active Application (which
means sharing data across two different Python modules, and even
though pybind11 docs suggest to "simply export a symbol", this
*cannot* possibly work in practice; instead we share data using a
Python capsule), and increase its refcount when returning the Context
instance
- decrease the Application refcount again when the Context gets
destructed
5 years ago
Vladimír Vondruš
84f9bb2a9d
Updated copyright year.
5 years ago
Vladimír Vondruš
0f98d2f172
python: expose new shaders.Phong features.
6 years ago
Vladimír Vondruš
4cb109f592
python: add remaining gl.Renderer.set_blend*() overloads and a test.
6 years ago
Vladimír Vondruš
799629e410
python: adapt to Magnum changes.
6 years ago
Vladimír Vondruš
b1d45fc85a
Updated copyright year.
6 years ago
Vladimír Vondruš
7aef7bd4c8
python: this was a bug in my test.
...
Interestingly enough, on Py3.7 this passed. Not exactly sure why.
6 years ago
Vladimír Vondruš
500311fa7c
python: add APIs for Color from/to sRGB int.
...
I need that for generating colormaps.
6 years ago
Vladimír Vondruš
38d56059e2
python: adapt to changes in the Primitives library.
...
Again without keeping backwards compatibility, sorry.
6 years ago
Vladimír Vondruš
2045e22463
python: properly check also level bounds in importers.
6 years ago
Vladimír Vondruš
a470eae5f1
python: adapt to Trade::MeshDataXD deprecation.
...
Right now there's no deprecation logic in place for the Python bindings,
so this is a breaking change. Sorry about that.
6 years ago