Skip to content
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
wants to merge 37 commits into
base: master
Choose a base branch
from
Open

Port to FFI::Platypus #8

wants to merge 37 commits into from

Conversation

jjatria
Copy link

@jjatria jjatria commented Jul 1, 2021

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 in t/namespace.t to keep track of what those symbols are).

Bindings to additional libraries (for now, SDL_mixer and SDL_image) exist in the SDL2::Mixer and SDL2::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.

Copy link
Member

@kthakore kthakore left a 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.

@KES777
Copy link

KES777 commented Sep 20, 2021

@jjatria What is SDL2::Raw which is missed?

perl -Ilib examples/hello.pl
Can't locate SDL2/Raw.pm in @INC (you may need to install the SDL2::Raw module) (@INC contains: lib /home/kes/perl5/perlbrew/perls/perl-5.30.3/lib/site_perl/5.30.3/x86_64-linux /home/kes/perl5/perlbrew/perls/perl-5.30.3/lib/site_perl/5.30.3 /home/kes/perl5/perlbrew/perls/perl-5.30.3/lib/5.30.3/x86_64-linux /home/kes/perl5/perlbrew/perls/perl-5.30.3/lib/5.30.3) at examples/hello.pl line 6.
BEGIN failed--compilation aborted at examples/hello.pl line 6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants