IRenderTarget

Interface for containers being able to draw elements.

Members

Functions

bind
void bind()

Set active container.

clear
void clear(float r, float g, float b)

Clears the container texture by calling bind() -> glClearColor(r, g, b, 1) -> glClear(GL_COLOR_BUFFER_BIT).

create
void create(int width, int height)

Create a container texture in the given resolution.

draw
void draw(IDrawable drawable, ShaderProgram shader = null)

Draws drawable using optional shader onto this. This will call drawable.draw(this, shader); If shader is null, ShaderProgram.default is gonna be used.

draw
void draw(Mesh mesh, ShaderProgram shader = null)

Draws raw geometry to the container texture using an optional shader. If shader is null, ShaderProgram.default is gonna be used.

resize
void resize(int width, int height)

Resize the container texture to the new width and height.

Properties

texture
Texture texture [@property getter]

Returns the result of the container texture.

Meta