Skip to content

cornellev/sdl-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sdl-wrapper

Ethan's wrapper around SDL for easier use.

Demo

git clone https://github.com/cornellev/sdl-wrapper.git
cd sdl-wrapper
make demo
./demo

Usage

The demo code does a good job showing all the features. Here's a step-by-step example. After including gui/window.h, you can create a window with

Window window("Window Name", WINDOW_WIDTH, WINDOW_HEIGHT);

Then, create a view that subclasses View and attach it to the window.

MyView* my_view = new MyView();
window.attach_view(my_view);

From then on, the the window will manage the memory allocated for my_view. Finally, present the window, which is a blocking call.

window.present();

You can install the library to /usr/local with sudo make install, sudo make uninstall, and sudo make reinstall.

Documentation

All header files are well documented. Please read them for additional information. For example, geo/midpoint.h contains a circle-drawing primitive.

GUI

Geometry

Utilities

About

Ethan's wrapper around SDL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published