Vladimír Vondruš
f0505b4bec
python: application Configuration WindowFlags were not plural-named.
...
Plus the docstring was wrong as well. Sigh.
1 year ago
Vladimír Vondruš
d011297c13
Here we go again.
1 year ago
Vladimír Vondruš
92d06e9e6b
python: adapt to Magnum key and pointer event changes.
...
No backwards compatibility now either, sorry.
2 years ago
Vladimír Vondruš
b0d714344a
It's October already?!
2 years ago
Vladimír Vondruš
305fdf81ee
It's 2023 already!
3 years ago
Vladimír Vondruš
ee284aa4aa
python: expose Application cursor setup and warping.
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š
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š
3ce8b6d96e
python: add also windowless CGL application.
...
Not sure how I forgot this one.
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š
ddfc5ccc36
python: adapt to STL string removal in Application classes.
...
A non-deprecated build didn't build anymore.
4 years ago
Vladimír Vondruš
d2f5ea43d5
CMake: use the CMAKE_FOLDER variable instead of FOLDER property.
...
It limits the support for CMake 3.12+, but it's much less verbose and I
don't expect people to use ancient CMake versions with IDEs like Xcode
or VS anyway, so this should be fine.
4 years ago
Vladimír Vondruš
2295f43873
Updated copyright year.
4 years ago
Vladimír Vondruš
5994150a68
python: expose glfw.Application.{swap_interval,main_loop_iteration}.
...
The first one was for some reason not exposed because it's a write-only
property (but all shaders have writeonly properites, so what's the
problem?), the second one got added in 2020.06 but the code here was not
updated.
5 years ago
Vladimír Vondruš
4d5a9ed456
python: expose viewport and exit event.
...
And also a possibility to make the window resizable on startup,
otherwise the viewport event gets never triggered.
5 years ago
Vladimír Vondruš
18ea028c8a
python: fix InputEvent.Modifier to behave like proper flags.
5 years ago
Vladimír Vondruš
9f08717e77
python: fixed a copypaste error in MouseMoveEvent.relative_position.
...
It returned the same as position, sigh.
5 years ago
Vladimír Vondruš
a2d16c15f8
python: expose Platform::GLContext as platform.{egl,wgl,glx}.Context.
...
Turning the link-time decision to a runtime decision. Crazily enough
this seems to work with no duplicate symbol issues (apart from having
to expose a function-local subclass).
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š
4bb19e0b3f
python: re-add an inverse of pybind11 2.2.4 workarounds for 2.6.
...
Sigh. AMAZING how they can break one thing twice in a span of a year
and a half.
This reverts commit aae98e0f02 .
6 years ago
Vladimír Vondruš
57db13422f
python: make this compatible with pybind11 2.6.
...
Pybind changed py::module to py::module_ in order to support C++
modules, adapting to that change. It still builds on older versions,
but we're using only the new APIs.
6 years ago
Vladimír Vondruš
1d278d1112
python: rename all Python.h headers to PythonBindings.h.
...
It conveys clearer what those headers are for and avoids issues where
shitty IDE indexers (Eclipse?) confuse this with Python's Python.h.
6 years ago
Vladimír Vondruš
b1d45fc85a
Updated copyright year.
6 years ago
Vladimír Vondruš
e222ba7a32
python: provide a better error if draw_event() is not overriden.
...
Otherwise it yells at the user that "pure virtual method called", and
that's no good.
6 years ago
Vladimír Vondruš
3a0c478834
python: a bunch of new keys in SDL and GLFW.
6 years ago
Vladimír Vondruš
875a81803b
python: avoid clash with the builtin platform module when running tests.
7 years ago
Vladimír Vondruš
7068412b7c
platform: expose Sdl2Application::mainLoopIteration().
7 years ago
Vladimír Vondruš
d2bec5eba7
python: fix build in a CMake subproject.
7 years ago
Vladimír Vondruš
34ca50dca8
python: expose application properties as actual properties.
7 years ago
Vladimír Vondruš
6bce9fbeb2
python: remove the black magic from magnum.platform.
...
Implicitly importing whole toolkits was not a good idea.
7 years ago
Vladimír Vondruš
9afe7ebe50
python: expose key and scroll events.
7 years ago
Vladimír Vondruš
0d671c823c
python: wire in the WindowlessWglApplication.
7 years ago
Cameron Egbert
14fa2247e9
python: MSVC doesn't like pure virtual methods in local classes.
7 years ago
Vladimír Vondruš
e8198cb97e
python: fix PyInit_* declarations to work on Windows as well.
...
Co-authored-by: Cameron Egbert <cegbert@oculus.com>
7 years ago
Vladimír Vondruš
d36aa31a37
python: properly provide virtual destructors for Application classes.
...
This time I actually have to thank you, Clang.
7 years ago
Vladimír Vondruš
375a22f08d
python: suppress Clang's -Wgnu-zero-variadic-macro-arguments warning.
...
Hmm. I seem to be the only one on Earth using pybind11 with Clang. Or
does everyone else just ignore all those warnings?!
7 years ago
Vladimír Vondruš
68e28685ff
python: fix Clang's -Wmissing-prototypes warnings.
...
This is a temporary change until a PR fixing this on pybind11 side is
merged (and a new version released).
7 years ago
Vladimír Vondruš
aae98e0f02
python: remove pybind11 2.2.4 workarounds.
7 years ago
Vladimír Vondruš
39f2699b90
python: more yelling at the buildsystem.
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š
670537d664
python: implement basic mouse events for SDL2 and GLFW apps.
...
This took a while because I wasn't able to convince pybind to do what I
want.
7 years ago
Vladimír Vondruš
33998df685
python: very barebones SDL2 & GLFW applications.
...
Similarly to the windowless ones, one of them gets picked up to be
platform.Application.
7 years ago
Vladimír Vondruš
caa1619eef
python: expose Windowless{Glx,Egl}Application in platform.{glx,egl}.
...
One of them is then available through the platform.WindowlessApplication
alias. The selection is a bit arbitrary now, but has to suffice.
7 years ago