SDL2Renderer

SDL Renderer wrapper.

Constructors

this
this(SDL2Window window, int flags)

Creates a SDL renderer which targets a window.

this
this(SDL2Surface surface)

Create a software renderer which targets a surface.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

clear
void clear()

Clear the current rendering target with the drawing color.

close
void close()

Releases the SDL ressource.

copy
void copy(SDL2Texture texture, box2i srcRect, box2i dstRect)

Blit a rectangle from a texture.

drawLine
void drawLine(vec2i a, vec2i b)

Draw a line.

drawLines
void drawLines(vec2i[] points)

Draw several lines at once.

drawPoint
void drawPoint(vec2i point)

Draw a point.

drawPoints
void drawPoints(vec2i[] points)

Draw several point at once.

drawRect
void drawRect(box2i rect)

Draw a rectangle outline.

fillRect
void fillRect(box2i rect)

Draw a filled rectangle.

present
void present()

Update the screen with rendering performed.

setBlend
void setBlend(int blendMode)

Sets SDL blend mode.

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

Sets the color used for drawing operations.

setViewport
void setViewport(box2i b)

Sets the window drawing area.

setViewportFull
void setViewportFull()

Sets the whole window as drawing area.

Variables

_renderer
SDL_Renderer* _renderer;
Undocumented in source.
_sdl2
SDL2 _sdl2;
Undocumented in source.

Meta