Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Download

git clone --recursive https://github.com/blackedout01/sdl-gl-template.git
or if already cloned without --recursive:
git submodule update --init

Update Submodules to newest commits

git submodule update --remote --merge
It's best to not always update to latest commits, since these might not be stable.
Instead, you can check out release commits of your library. In SDL (and other libraries probably) they are tagged. To check them out, run the following commands inside the submodule repository:
git tag
git checkout <insert tag name here>
Finally your submodule changes can be added and committed in the base repository.

Build on MacOS

Clang

Install your build tools
Open terminal and navigate to repository
Build all libraries once: sh buildlibs.sh
Now there are 3 new files: libSDL2main.a, libSDL2.a and glad.a
Build project: sh build.sh
Run project: ./a.out

Build on Windows

MSVC

Install Visual Studio Build Tools https://visualstudio.microsoft.com/de/downloads/?q=build+tools (at the bottom of the page)
Open "x64 Native Tools Command Prompt for VS 2022" and navigate to repository
Build all libraries once: buildlibs.bat
Now there are 4 new files: SDL2main.lib, SDL2.lib, glad.lib and SDL2.dll (I don't understand how to build static SDL)
Build project: build.bat (not sure about that warning either)
Run project: main.exe

Build on Linux

Open terminal and navigate to repository
Build all libraries once: sh buildlibs.sh
Now there are 3 new files: libSDL2main.a, libSDL2.a and glad.a
Build project: sh build.sh
Run project: ./a.out

About

A public domain SDL2 OpenGL template project including build scripts

Resources

Stars

27 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages