Skip to content

A CLion, or cmake, project that will make it easy to start a project that uses the SDL2 library.

License

Notifications You must be signed in to change notification settings

rnistuk/EasySDL2Setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasySDL2Setup

A CLion, or cmake, project that will make it easy to start a project that uses the SDL2 library. SDL2 provides low-level access to audio, keyboard, mouse, joystick, and graphics.

SDL2 is my go to library when I need to visualize some functionality but don't want to go to the bother of too much set up.

Getting Started

Use brew to install SDL2 (SDL2: stable 2.0.12) From the EasySDL2Setup directory follow the following steps to build the project

mkdir build
cd build
cmake ..
make

the application demo will be in build in the build/sdl_application directory.

cd sdl_application
./demo

Next Steps

I've deliberately made this project as simple as possible, there are a number of things that could be done to make it better:

  • encapsulate the draw and setup functions into a class
  • SDL_Window and SDL_Renderer could be turned into std::shared_ptr
  • encapsulate SDL_Window and SDL_Renderer into their own classes
  • ...

Prerequisites

The following applications were used to create and build this demo.

  • macOS Catalina(Version 10.15.4)
  • CLion 2020.1.1, c++17,
  • cmake 3.17.2
  • GNU Make 3.81.

Built With

Contributing

I'd be happy to hear any suggestions to make this project more useful.

Authors

  • Rich Nistuk - Initial work - rnistuk

Acknowledgments

  • Noah - Noah likes python and created the wavelength to rgb converter that I used as an example in this project.

About

A CLion, or cmake, project that will make it easy to start a project that uses the SDL2 library.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published