NEWS:
01-27-2002
Version 0.1.6 Released.
[What's new]
01-25-2002
Version 0.1.5 Released.
[What's new]
10-27-2001
Version 0.1.4 Released.
[What's new]
09-16-2001
Version 0.1.3 Released.
[What's new]
What is SEL?SEL is a C++ library that extends and wraps the SDL library. The SDL library is a generic low level multiplatform api for accessing audio, keyboard, mouse, joystick, threads, 3d hardware via OpenGL, and 2d framebuffer.SEL stands for Simple DirectMedia Layer Extension Library. The purpose of SEL is to provide a C++ interface for the SDL library and to extend it's functionality. SEL tries to be as much backwards compatible with SDL as possible, while introducing native C++ features as namespaces, classes, and exceptions. SEL should also run on as many platforms as SDL does. Key features
SEL consists of four separate
(but not independent) libraries. These are:
SEL consists of three (logical) parts (or layers).
1. Translation of the SDL identifiers
In SEL each SDL
identifier that begins with SDL_ belongs to the
SDL namespace. (i.e. SDL_Surface is
SDL::Surface, SDL_SetVideoMode is
SDL::SetVideoMode, but SDL_ALPHA_OPAQUE
is SDL::ALPHA_OPAQUE and not
SDL::ALPHA::OPAQUE.)
The namespace SDL also contains "sub" namespaces WM and GL for window manager and open gl related functions. Note that identifiers SDL::Surface and SDL_Surface are equal. It does not matter whether you use SDL::Surface or SDL_Surface in your code. But I prefer SDL::Surface to SDL_Surface in C++ code, because it makes the code more consistent. All identifiers from the SDL namespace are just directly translated SDL identifiers and do not provide any enhanced functionality or API changes. The SDL namespace provides no classes, and does not wrap any SDL objects. No function from the SDL namespace throws an exception. Since all the translation fuctions are inlined, the speed penalty should be minimal. See the file SEL_sdl.h to see how it exactly works. 2. The actual SEL wrappers and extension classes.
As opposite to the identifiers from the SDL
namespace, the SEL namespace contains higher
level wrappers of the SDL objects.
So the difference between SDL::Surface and SEL::Surface (or just Surface, if you are `using namespace SEL') should be obvious. While the SDL::Surface is just a SDL_Surface structure, the SEL::Surface is a full featured class that takes advantage of the neat C++ features like exceptions, etc. For more information about particular classes from the SEL namespace consult the SEL refrence documentation. 3. Additional classes.
SEL also contains some classes to simplify
common things such as drawing basic graphic primitives or text,
managing resources or merging dirty rectangles. Some of these
are mentioned here. Consult the
SEL refrence documentation for more info.
SEL::Painter - drawing basic graphic primitives
This class implements drawing of lines and rectangles with
support of alpha-blending.
SEL::Resource - resource management
See the demo to find out how this works.
SEL::Uta - microtile arrays (region management)
This is one of the most powerfull ways of managing
dirty rectangles. It's very fast and produces optimized
set of non-overlapping rectangles. However, the area covered by
the resulting rectangles is ussualy little bigger than the
original area.
Despite it's low version number, the SEL
now wraps about 85% of the SDL
functionality. SDL audio
and overlays are still to be wrapped.
But the goal of SEL is not just to wrap
SDL. It's to provide an extension
layer, classes that would seamlessly integrate with the current
wrappers.
The SEL has not been extensively tested yet
so all testers (as well as any other help) are welcome.
I would appreciate help of any kind (comments, bugfixes). The documentation itself needs also some corrections (a lot of...). If you find some bugs, grammar mistakes or parts of the documentation that are not clean enough, please let me know. (If you found nothing it means that you have not read the documentation :)
The SEL is distributed under the terms of the
GNU Library General Public Licence. It means that you can use the
SEL library for both free and commercial purposes as
long as you link you program with it dynamically. See the COPYING file in the
source root directory or the licence here for more
information.
The latest version of SEL is 0.1.6. It's a
development version, but it should be usable yet.
You can download the file here.
The tarball contains the library source code and the documentation.
SEL requires the SDL library (version 1.2.0 or higher) and the SDL_Image library.
The SEL has a html reference documentation which
can be viewed online here.
This page and SEL is copyright (c) 2001, 2002
Matej Knopp.
|