You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's tutorial for libSDL2pp,
C++11 bindings/wrapper for SDL2. It covers core functionality of
the library, including initialization and window construction,
loading image files, sprite and text rendering, animation, and event
handling trying to demonstate library features in as little code
as possible.
Lessons
The tutorial is split into lessons, which demonstrate gradual
development of a simple application resembling a platformer game.
lesson00: SDL library initialization, window creation, image loading and rendering
lesson01: picking specific sprite from an image atlas
Each lesson adds some lines to the code and, thus, functionality
to the application. You can explore these lessons sequentially
starting from the first one (in which you might find e.g. git diff lesson00.cc lesson01.cc helpful to see what was added by
the next lesson), or just jump straight to the last one and see
all bits at once.
Building
To build executables from these lessons, you need cmake, SDL2,
SDL2_image and SDL2_ttf libraries and corresponding development
files.
To build the tutorial, run
cmake . && make
which will produce a set of binaries: lesson00 .. lesson07.