spacebox/README

73 lines
2.4 KiB
Plaintext

++~~~~~~~~~~~~~~~~~~~~~~~++
:: ::
:: SFW (SDL Framework) ::
:: ::
++~~~~~~~~~~~~~~~~~~~~~~~++
SFW is a C++ framework that facilitates the creation of SDL projects. It
provides generic game objects that can be used, extended or overwritten. Games
written using this framework can be exported to PC, Mac, Linux, Web GL,
Raspberry Pi, and Android.
It is in an early untested state. It comes with a simple program that
demonstrates how to use it for a project that can switch between SDL and OpenGL
contexts.
Requirements
````````````
The SFW source includes some external libraries in lib/, but there are other
libraries that must also be present in order to compile a project which uses the
framework
* libSDL2 (developed against v2.0.14)
* libSDL2-image
* libSDL2-ttf
* libSDL2-mixer
* OpenGL/GLES/GLES2
* compiler that supports C++17
Installing Requirements
```````````````````````
libSDL2, libSDL2-image, libSDL2-ttf, and libSDL2-mixer must be available to
link with your project, so you can try your package manager's libSDL2 dev
packages or build from source. The included sdl2-config utility program can be
used to generate flags for linking to SDL2 when it is installed outside of
your platform's usual library location.
libSDL2:
- Download from http://libsdl.org/download-2.0.php
- Run ./configure --prefix=[YOUR LIBRARIES PATH] (I'm using ~/local/sdl)
- Run make && make install
libSDL2-image, libSDL2-ttf, libSDL2-mixer:
- Download from:
- https://www.libsdl.org/projects/SDL_image/
- https://www.libsdl.org/projects/SDL_ttf/
- https://www.libsdl.org/projects/SDL_mixer/
- Run ./configure --prefix=[YOUR LIB PATH] --with-sdl-prefix=[YOUR SDL PATH]
- In my case, prefix and SDL prefix are both ~/local/sdl
OpenGL/GLES/GLES2:
- Install GL/GLES according to your platform and link to it during compilation.
GLEW is included in the lib/ folder of this framework and should find GL on
your platform if it is installed.
Demo
````
The `demo/` folder contains a simple cube demo. The main purpose of the demo is
to demonstrate switching between 3D and 2D contexts. In order to compile the
demo, you will have to edit the paths in the Makefile to point to the locations
of the necessary libraries on your system.
License
```````
This software is dedicated to the public domain. See
http://creativecommons.org/publicdomain/zero/1.0/ for details.
Author
``````
420 [AT] shampoo.ooo