-
Notifications
You must be signed in to change notification settings - Fork 4
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
Port to FFI::Platypus #8
Open
jjatria
wants to merge
37
commits into
PerlGameDev:master
Choose a base branch
from
jjatria:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
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
This example did not work with the version of SDL_mixer that ships with Ubuntu. Once I built my own and linked to it, the program behaved as expected (modulo the remaining bugs).
Since some of these are not implemented until 2.0.10, this commit adds some logic to replace them with stubs that will die with an error message.
kthakore
requested changes
Jul 10, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could break up this PR? Very hard to digest. Also please add some docs/updates in current docs.
@jjatria What is SDL2::Raw which is missed?
|
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.
As discussed via email with @kthakore, this is an attempt at providing a first release of a sufficiently complete set of bindings for SDL2 using FFI::Platypus.
Unlike the previous codebase in this repository, this set of bindings try to offer as little sugar as possible to start with. The intention is that, once a set of raw bindings are made available under the SDL2 namespace, then higher level wrappers can be built on top (on eg.
SDL2x::
, etc).This version lives in a single module, and exports nothing by default: all of its symbols are under
SDL2::
(we have a test int/namespace.t
to keep track of what those symbols are).Bindings to additional libraries (for now,
SDL_mixer
andSDL_image
) exist in theSDL2::Mixer
andSDL2::Image
namespaces, although these might have to be moved somewhere else, maybe even to different distributions, to support platforms where these extensions are not available.This version of the code is not complete. In particular, tests and documentation are lacking. Some tests have been ported from the ones existing in this repository, and a number of example files are made available in the
examples
directory to illustrate how it can be used.Comments and suggestions on how this should move forward are very welcome indeed.