Dummy Systems

Some of the systems are provided not for production use but for use as dummies during development on a desktop system. These systems provide implementations of interfaces normally implemented on devices using facilities that are commonly available on a desktop computer.

SDL Dummy System

The SDL dummy system uses the Simple DirectMedia Layer to provide certain capability implementations.

The SDL system is not included in a build by default. To include it build the library with the SDL_DUMMIES=1 parameter, and be sure to include libsdl when linking.

2D Graphics

The SDL dummy system provides an implementation of the 2D graphics capability in terms of SDL video. This can be used to try application code that is written in terms of this capability.

template < unsigned int WIDTH, unsigned int HEIGHT, unsigned int PIXEL_SCALE = 1 >
class WindowedSdl2dGraphicsSurface

An implementation of the IBuffered2dGraphicsSurface interface that renders pixels to an SDL window.

The SDL window will be created as part of the constructor but it’s the caller’s responsibility to run an SDL event loop to keep the window on-screen and updated.

Public Functions

WindowedSdl2dGraphicsSurface()

template < unsigned int WIDTH, unsigned int HEIGHT, unsigned int PIXEL_SCALE >
class InMemorySdl2dGraphicsSurface

An implementation of the IBuffered2dGraphicsSurface interface that renders pixels to an off-screen SDL surface.

Since this class calls SDL_CreateRGBSurface as part of its constructor it’s important to be sure to have already called SDL_SetVideoMode before instantiating this.

Public Functions

InMemorySdl2dGraphicsSurface()

~InMemorySdl2dGraphicsSurface()

Table Of Contents

Previous topic

AVR

Next topic

Features

This Page