Renderer

Renderer support (hardware) accelerated rendering.

Constructors

this
this(Window win, Flags flags)

Use this function to create a 2D rendering context for a window.

this
this(Surface srfc)

Use this function to create a 2D software rendering context for a Surface.

Members

Enums

BlendMode
enum BlendMode

Supported BlendModes

Flags
enum Flags

Supported Flags

Functions

clear
void clear()

Use this function to clear the current rendering target with the drawing color.

copy
bool copy(RendererTexture hw, ShortRect* src, ShortRect* dst)

Use this function to copy a portion of the texture to the current rendering target.

createRendererTexture
RendererTexture createRendererTexture(Surface srfc, bool release, RendererTexture.Access access)

Use this function to create a texture from an existing surface.

createRendererTexture
RendererTexture createRendererTexture(Surface srfc, bool release, RendererTexture.Access access)

Rvalue version

createSoftTexture
RendererTexture createSoftTexture(ushort width, ushort height, RendererTexture.Access access)

Use this function to create a texture for a rendering context.

getBlendMode
BlendMode getBlendMode()

Use this function to get the blend mode used for texture copy operations.

getViewport
ShortRect getViewport()

Use this function to get the drawing area for the current target.

opAssign
void opAssign(Renderer rhs)
Undocumented in source.
present
void present()

Use this function to update the screen with rendering performed.

readPixels
void* readPixels(ShortRect* rect)

Use this function to read pixels from the current rendering target. Note: This is a very slow operation, and should not be used frequently. Note: This method <b>allocates</b> GC memory.

setBlendMode
void setBlendMode(BlendMode bmode)

Use this function to set the blend mode for a texture, used by 'copy'.

setDrawColor
void setDrawColor(Color col)

Use this function to set the color used for drawing operations (clear).

setDrawColor
void setDrawColor(Color col)

Rvalue version

setDrawColor
void setDrawColor(ubyte r, ubyte g, ubyte b, ubyte a)

Use this function to set the color used for drawing operations (clear).

setTarget
bool setTarget(Surface srfc)

Set a Surface as the current rendering target.

setTarget
bool setTarget(RendererTexture hw)

Set a SoftTexture as the current rendering target.

setViewport
void setViewport(ShortRect view)

Use this function to set the drawing area for rendering on the current target.

setViewport
void setViewport(ShortRect view)

Rvalue version

Properties

height
ushort height [@property getter]

Returns the height

width
ushort width [@property getter]

Returns the width

Static functions

countDrivers
int countDrivers()

Use this function to get the number of 2D rendering drivers available for the current display.

getFrom
Renderer getFrom(Window win)

Use this function to get the renderer associated with the window.

Variables

flags
Flags flags;

Flags

Meta

Authors

rschuett