-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python bindings #1
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #1 +/- ##
=========================================
Coverage ? 93.18%
=========================================
Files ? 26
Lines ? 1805
Branches ? 0
=========================================
Hits ? 1682
Misses ? 123
Partials ? 0
Continue to review full report at Codecov.
|
mosra
force-pushed
the
python
branch
2 times, most recently
from
May 2, 2019 18:10
1eadca7
to
e88148a
Compare
Only the double ones, exposed as floats, because the extra ALU required by doubles is negligible to function call overhead. It'll be different for non-scalar types, but here I use this.
mosra
force-pushed
the
python
branch
5 times, most recently
from
May 21, 2019 21:48
2924454
to
9cf3b76
Compare
Only the double variants (since Python doesn't really differentiate between 32bit and 64bit floats) and directly into math to mimic Python's math module.
Not the Matrix4 / Matrix3 transformation types yet, though.
mosra
force-pushed
the
python
branch
4 times, most recently
from
May 23, 2019 00:36
e88dc97
to
9be4d5e
Compare
Similarly to the windowless ones, one of them gets picked up to be platform.Application.
Just stuff I consider important at the moment scattered across numerous files.
By including pybind11 and Python headers as SYSTEM. Possible in pybind11 master, but not yet part of any release so I'm patching it manually.
Generating both C++ and Python coverage.
Mainly for RGB -> RGBA shortcuts. Need to invent some nice decoding from a string.
Except textures.
Also fix element sizes that aren't 1.
Similarly for Matrix3. Also make it implicitly convertible from the base type.
This took a while because I wasn't able to convince pybind to do what I want.
Such a tiny feature and such a pain when it's not there.
Eh, I would say this is enough for the initial MVP. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Split from mosra/magnum#228. Things to do:
everythingreasonable base from the Math libxaxis()
might be okay butshearxz()
definitely isn't) -- went back to all underscores, everything else is inconsistentMatrix3.scaling()
vsmat.scaling()
)convince Python that it can have a property and static method of the same name (-- postponedMatrix3.translation()
vsmat.translation
)$<TARGET_EXISTS>
doesn't exist until CMake 3.12, need other solutionhow to support variadic templates (in particular Mesh::addVertexBuffer())?postponed*args
?(currently it's implicit and doesn't really work)it "just works" now