FlatBackgroundGUI

FlatBackgroundGUI provides a background that is loaded from a PNG or JPEG image. The string for backgroundPath should be in "stringImportPaths" specified in dub.json

class FlatBackgroundGUI : GUIGraphics(
string backgroundPath
) {}

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

onDrawRaw
void onDrawRaw(ImageRef!RGBA rawMap, box2i[] dirtyRects)

Fill diffuse map with diffuse from background image. Alpha is ignored since ideally a background image will not need an alpha channel. Material and depth maps are zeroed out to initialize them. Otherwise this can lead to nasty errors.

Meta