A library for high-performance, modern 2D graphics with SDL written in C.
A library for high-performance, modern 2D graphics with SDL written in C.
SDL_gpu, a library for making hardware-accelerated 2D graphics easy. by Jonathan Dearborn SDL_gpu is licensed under the terms of the MIT License. See LICENSE.txt for details of the usage license granted to you for this code.
SDL_gpu is free and open source! You can help either by contributing a pull request, filling out a bug report, sending an email, or give me a chance to put more time into it by donating: Anything you can do to help is really appreciated!
SDL_gpu is hosted on Github (https://github.com/grimfang4/sdl-gpu). You can check out the latest version of the source code with Git:
git clone https://github.com/grimfang4/sdl-gpu.git sdl-gpuSDL 1.2 or SDL 2.0 (www.libsdl.org)
A rendering backend
Currently implemented:
OpenGL 1.1, 2.0, 3.0, 4.0
OpenGL ES 1.1, 2.0, 3.0Automated Windows build status and prebuilt library files can be found at the Appveyor page: Automated build status for Linux and MacOS can be found at the project page on Travis CI: SDL_gpu uses CMake (www.cmake.org) to coordinate the library build process. CMake is available as a GUI program or on the command line.
For Linux/UNIX systems, run CMake in the base directory:
cmake -G "Unix Makefiles"
make
sudo make installFor Linux/UNIX systems, changing the default installation directory can be done like so:
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usrFor Windows systems, you can use cmake-gui and select appropriate options in there (warning: cmake-gui is messy!).
Add the include for SDL_gpu.h to your sources. Link to SDL2_gpu (libSDL2_gpu.a) or SDL_gpu (if you use the old SDL 1.2).
Documentation is automatically generated with Doxygen (http://sourceforge.net/projects/doxygen).
Pre-generated documentation can be found on the Github.io page: https://grimfang4.github.io/sdl-gpu/
SDL_gpu can be used to replace the SDL_Render subsystem of SDL2. SDL_gpu uses GPU_Target to represent a render target (a render destination, e.g. the screen) instead of an SDL_Renderer object. SDL_gpu also uses GPU_Image as a texture container (a render source) instead of SDL_Texture.
Here is a list of most of the comparable functions:
…Some SDL functions use a rectangular region passed as an SDL_Rect. SDL_gpu uses floating point coordinates for subpixel precision, so you may have to use GPU_Rect for some SDL_gpu functions.
No open issues yet, or sync has not completed.