Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members File Members Related Pages
SDLmm - A C++ Wrapper for the Simple DirectMedia Layer
SDLmm is a C++ glue for SDL, or the Simple DirectMedia Layer, which is a generic API that provides low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D framebuffer across multiple platforms.
SDLmm aims to stay as close as possible to the C API while taking advantage of native C++ features like object orientation. We will also aim at being platform independent as much as possible. I.e we'll try to support ever platform supported by SDL.
This website and the SDLmm project pages are hosted at SourceForge. For CVS information, downloads, bug tracking, feature requests, mailing list information and more, visit our SourceForge project page.
This library is, like SDL, distributed under GNU LGPL version 2 license, which can be found in the file COPYING. This license allows you to use SDLmm freely in commercial programs as long as you link with the dynamic library.
This is a brief idea of the planned order of implementation, in order of priority (highest first).
- Implement a complete wrapper around the SDL library, using a logical and simple object oriented design. Use as few global functions as possible.
- Add support for commonly used third party libraries. This includes popular libs like SDL_image, SDL_ttf and SDL_mixer.
- Build new features on the SDLmm framework, adding useful features not available in SDL. This might include utility functions like scaled blitting, drawing primitives (lines, polygons etc) and sprites. Since there are other libraries providing many of these features, it is to be determined what actually will be added.
- Build a logical C++ glue, allowing for easy-to-use object oriented SDL programming, keeping everything within it's own namespace, SDLmm.
- Stay as close as possible to the syntax as SDL. This includes using a similar naming scheme. For example SDL_BlitSurface() becomes SDLmm::Surface::Blit().
- When it makes sense, convert functions to returning true of false to indiciate success/failure as opposed to 0 or -1. Sometimes this is not viable, since a function might return 0, -1 or -2 (for example).
- Avoid the use of unnecessary global functions. If it makes sense to move a function to a class, then it should be done. Also, avoid duplication. I.e if there is a SDLmm::Surface::LoadBMP() method, there won't be a global SDLmm::LoadBMP() method.
- Use of exceptions is yet to be decided. Right now, none are used. However they should be considered for use in at least constructors where there is no other way to indicate a failure than to thrown an exception. In any case, exceptions would only be used for FATAL errors.
- Write and maintain class documentation using the doxygen toolkit. All actual documentation is to be done in the include files (and not the .cpp files). The reason being that the .h files always will include all functions, while the .cpp files might not (i.e inlined functions).
- Write annotated code examples. Doxygen has a very nice feature for doing this. It just takes time to write the examples and to document them.