++~~~~~~~~~~~~~~~~~~~~~~~++ :: :: :: 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/ that the default Makefile included with the demo shows how to compile, 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 $HOME/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 $HOME/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. Other libraries ``````````````` These are other libraries that have been used in projects that use this framework but aren't required by the framework opencv: - Download from https://opencv.org/releases/ - configure (with custom installation path) cmake -DCMAKE_INSTALL_PREFIX=$HOME/local/opencv .. - make && make install zbar: - Download from http://zbar.sourceforge.net/download.html - configure to only use image processing features (requires imagemagick) and choose your installation directory ./configure --without-gtk --without-python --without-qt --disable-video --prefix=$HOME/local/zbar - make && make install License ``````` The original code for this framework is licensed to freely use, copy, modify and sell, without restriction under the zlib license. See LICENSE.txt for details. BPmono.ttf is licensed under the Creative Commons Attribution - No Derivative Works 3.0 license. See LICENSE_BPmono.txt for details. gif-h is unlicensed, public domain code released under the The Unlicense. See lib/gif-h/LICENSE GLEW is included under a permissive license in lib/glew/LICENSE.txt GLM is included under the MIT license in lib/glm/LICENSE nlohmann's json library is included under the MIT license in lib/json/LICENSE.MIT SDL2 GFX is included under a permissive license in lib/sdl2-gfx/LICENSE superxbr.cpp is included under a permissive license at the top of lib/superxbr.cpp Business ```````` 420@shampoo.ooo