Skip to content
/ sdlbox Public

Quick template/proof-of-concept for building and using SDL3 to define a basic cross-platform OpenGL application using cmake

Notifications You must be signed in to change notification settings

Tythos/sdlbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sdlbox

Quick template/proof-of-concept for building and using SDL3 to define a basic cross-platform OpenGL application using cmake. Quick steps to reproduce, after cloning this repository, are as follows:

  1. Set up SDL, which is referenced within this project as a submodule:

    > git submodule update --init --recursive
    
  2. Configure the build, using cmake:

    > cmake -S . -B build
    
  3. Execute the build; using the "--build" flag will tell cmake to compile and link using whatever development environment is available on your platform:

    > cmake --build build
    
  4. The above will also build the SDL3 libraries, but before running the main executable you must copy the DLL over:

    > copy build/SDL/Debug/SDL3.dll build/Debug
    
  5. Now you can run the program from the build product folder (we assume Windows here with the .EXE extension):

    > cd build/Debug
    > sdlbox.exe
    

If successfull, you should see a pink rectangle filling the window context. Press "ESCAPE" any time to quit the application.

About

Quick template/proof-of-concept for building and using SDL3 to define a basic cross-platform OpenGL application using cmake

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published