Documentation: SDLX - OutOfTheVoid/ProjectRed GitHub Wiki
( Up one level: Root )
Overview
SDLX is the SDL2 eXtension library.
It is a class library designed to provide an easy to use object oriented wrapper to the SDL2 framework, and serves largely as the OS abstraction library for Project Red. This was the first sub-library designed in this project, and has a marginally different design than the rest of the code in this project, but should remain roughly similar in terms of usage. For the most part, this sub-library is finalized, and will only be visited should some change be necessary to add features to the engine as a whole. While it is intended as a support library, it can be used entirely separately from Project Red (under the same license) by simply undefining all dependancy defines such as SDLX_XENON_GL_INTERFACE
.
The overall namespace is defined in SDLX/SDLX.h
The define SDLX_XENON_GL_INTERFACE
in SDLX.h sets whether SDLX should interface with and depend on Xenon to compile.
several constants are defined in the SDLX
namespace, which specify global status codes written by nearly all functions and methods to an uint32_t *
Status
parameter.
Global status codes:
kStatus_Success
: Success. The operation was successful and completed without errors.kStatus_SDLInitFailed
: Initialization of SDL failed.kStatus_SDLWaitEventFailed
: SDL failed to wait on the event loop properly.kStatus_SDLQuit
: SDL received aQuit
command from the window manager.kStatus_LibInitFailed
: An SDL library failed to initialize.kStatus_RegisterEventsFailed
: SDLX failed to register an event.
SDLX
namespace:
Classes and namespaces within the AudioDevice
: Represents a single sound device interface to the sound driver. ( Optionally interfaces withRed::Audio :: IAudioOutputDevice
)GLContext
: represents an OpenGL context which can be bound to the current thread as well as functions to specify requested context properties. ( Optionally interfaces withXenon::GPU :: IGLContext
)Keyboard
: Represents the system keyboardLib
: Represents the SDL2 library in general, and contains the event loop logicMouse
: Represents the system mouseMutex
: Represents an SDL2 MutexRefCounted
: Contains refcounting logicRenderer
: Represents an SDL2 rendererSurface
: Represents an SDL2 surfaceTexture
: Represents an SDL2 textureTimer
: Represents an asynchronous event timerUserEvent
: Represents the user-event system, allowing for thread-safe queueing of user-defined eventsWindow
: Represents an SDL2 Window