[WIN/MAC/Linux-64] SDL2 (+mixer,image,ttf,net) + modern OpenGL
Posted: Thu Oct 08, 2020 5:31 pm
I have translated the c-header from the complete SDL - package for Pure Basic.
I added some small exmaples and a "translator" for the Lazy-Foo - SDL-Tutorials https://lazyfoo.net/tutorials/SDL/ (please read the readme!).
https://github.com/GPIforGit/SDL_For_PB/releases
Mac users must download and install the sdl-framework:
Sorry, I don't have any experience with linux, but it should easy to add support for it. When somebody has done it, I will add this to the package.
Why SDL?
- Check mouse without problems, when in windows a desktop-scale is set other than 100%
- Switch between window, borderless window and fullscreen without reloading all the sprites.
- Playback of mp3, ogg etc. (I had the problem, that PB doesn't like my OGGs)
- Support for Joystick and Gamepad - including rumble. Simple connect a PS4, XBOX or Switch-Pro Controller and SDL will support it.
Examples:
https://github.com/GPIforGit/SDL-Examples
Modern OpenGL Examples:
https://github.com/GPIforGit/LearnOpenGL/releases
I added some small exmaples and a "translator" for the Lazy-Foo - SDL-Tutorials https://lazyfoo.net/tutorials/SDL/ (please read the readme!).
https://github.com/GPIforGit/SDL_For_PB/releases
Mac users must download and install the sdl-framework:
Code: Select all
download *.dmg from this files
https://www.libsdl.org/download-2.0.php#source
https://www.libsdl.org/projects/SDL_image/
https://www.libsdl.org/projects/SDL_mixer/
https://www.libsdl.org/projects/SDL_net/
https://www.libsdl.org/projects/SDL_rtf/
https://www.libsdl.org/projects/SDL_ttf/
open the *.dmg
copy "sdl*.frameworks" to /Library/Frameworks/
more infos for example here: https://lazyfoo.net/tutorials/SDL/01_hello_SDL/mac/index.php
Why SDL?
- Check mouse without problems, when in windows a desktop-scale is set other than 100%
- Switch between window, borderless window and fullscreen without reloading all the sprites.
- Playback of mp3, ogg etc. (I had the problem, that PB doesn't like my OGGs)
- Support for Joystick and Gamepad - including rumble. Simple connect a PS4, XBOX or Switch-Pro Controller and SDL will support it.
Examples:
https://github.com/GPIforGit/SDL-Examples
Modern OpenGL Examples:
https://github.com/GPIforGit/LearnOpenGL/releases