Skip to content

C++ API for the Simple Directmedia Library (SDL). Carefully designed C++ interface for the C-based SDL, focused on making memory safety trade-offs explicit and preserving performance of the original.

License

Notifications You must be signed in to change notification settings

maximsmol/rolmodl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rolmodl is a C++ API for the Simple Directmedia Library 2 (SDL2). The overhead is minimized, as long as this does not compromise other design goals. In general, the abstraction layer varies in depth quite a lot.

Design goals

  1. rolmodl exposes risks to the consumer and makes it non-trivial to make mistakes

    • Type safety
    • Compile-time checks
  2. rolmodl does not add new features

  3. rolmodl implements all features of SDL2

Status

The doxygen documentation is available at https://maximsmol.github.io/rolmodl/.

An example program is available that showcases some of the features and their inteded use.

The todo files list the features that were left unimplemented in the meantime. The project todo is a developer reference of porject goals and shorcomings

Features:

  • Window class
  • Renderer class
  • Texture class
  • Semantic geometric classes
  • C++ class enums in place of C enums and defines
  • Pixel format factory
  • Mouse state polling
  • Keyboard state polling
  • Event polling
  • Mouse cursor control
  • System information polling
  • Exception-based error handling

Planned Features:

  • OpenGL support
  • Surface class
  • Clipboard support
  • Vulkan support
  • SDL initialization and finalization support
  • Hint support
  • Log support
  • SDL assertion support
  • Version query support
  • $ gestures support
  • Text input support
  • toString for enums
  • Joystick support
  • Game controller support
  • Haptic support
  • Audio support
  • SDL thread support
  • SDL synchronization support
  • SDL atomics support
  • SDL timers support
  • SDL filesystem abstraction support
  • SDL file I/O support
  • SDL shared object tools support
  • SDL byte tools support
  • SDL bit order tools support
  • Platform-specific functions support
  • SDL stdlib aliases
  • See the todo files

Building

rolmodl uses Shake. It depends on SDL2.

After installing the dependencies, simply run ./build.sh from the project folder.

Manual

Include the rolmodl header: ./src/rolmodl/hpp/Rolmodl.hpp. Link with the rolmodl shared library ./dist/dbg/librolmodl.dylib (or your OS equivalent).

Use ./run.sh to run the test application.

About

C++ API for the Simple Directmedia Library (SDL). Carefully designed C++ interface for the C-based SDL, focused on making memory safety trade-offs explicit and preserving performance of the original.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published