UGDK
0.5.0
|
#include <ugdk/graphic/canvas.h>
Public Member Functions | |
Canvas (RenderTarget *render_target) | |
~Canvas () | |
void | ChangeShaderProgram (const ShaderProgram *shader_program) |
bool | IsActive () const |
Queries if this object is currently bound. More... | |
math::Vector2D | size () const |
const math::Geometry & | current_geometry () const |
const structure::VisualEffect & | current_visualeffect () const |
const ShaderProgram * | shader_program () const |
void | PushAndCompose (const math::Geometry &geometry) |
void | PushAndCompose (const structure::VisualEffect &effect) |
void | PopGeometry () |
void | PopVisualEffect () |
void | Clear (structure::Color) |
void | SendUniform (const std::string &name, float t1) |
void | SendUniform (const std::string &name, float t1, float t2) |
void | SendUniform (const std::string &name, const math::Vector2D &) |
void | SendUniform (const std::string &name, float t1, float t2, float t3) |
void | SendUniform (const std::string &name, float t1, float t2, float t3, float t4) |
void | SendUniform (const std::string &name, const TextureUnit &unit) |
void | SendVertexData (const VertexData &data, VertexType type, size_t offset, int size=2, int vertex_per_data=1) |
The VertexType should later be disabled using Manager::DisableVertexType. More... | |
void | DrawArrays (DrawMode, int first_vertex, int vertex_count) |
Binds the RenderTarget to allow rendering. Unbinds automatically on destructor. Creating multiple instances at the same time are supported, but the lifetime of the instances should act as a stack. TODO: example about this.
The only valid calls on inactive instances are const-qualified methods.
ugdk::graphic::Canvas::Canvas | ( | RenderTarget * | render_target | ) |
ugdk::graphic::Canvas::~Canvas | ( | ) |
void ugdk::graphic::Canvas::ChangeShaderProgram | ( | const ShaderProgram * | shader_program | ) |
void ugdk::graphic::Canvas::Clear | ( | structure::Color | ) |
|
inline |
|
inline |
void ugdk::graphic::Canvas::DrawArrays | ( | DrawMode | , |
int | first_vertex, | ||
int | vertex_count | ||
) |
bool ugdk::graphic::Canvas::IsActive | ( | ) | const |
Queries if this object is currently bound.
void ugdk::graphic::Canvas::PopGeometry | ( | ) |
void ugdk::graphic::Canvas::PopVisualEffect | ( | ) |
void ugdk::graphic::Canvas::PushAndCompose | ( | const math::Geometry & | geometry | ) |
void ugdk::graphic::Canvas::PushAndCompose | ( | const structure::VisualEffect & | effect | ) |
void ugdk::graphic::Canvas::SendUniform | ( | const std::string & | name, |
float | t1 | ||
) |
void ugdk::graphic::Canvas::SendUniform | ( | const std::string & | name, |
float | t1, | ||
float | t2 | ||
) |
void ugdk::graphic::Canvas::SendUniform | ( | const std::string & | name, |
const math::Vector2D & | |||
) |
void ugdk::graphic::Canvas::SendUniform | ( | const std::string & | name, |
float | t1, | ||
float | t2, | ||
float | t3 | ||
) |
void ugdk::graphic::Canvas::SendUniform | ( | const std::string & | name, |
float | t1, | ||
float | t2, | ||
float | t3, | ||
float | t4 | ||
) |
void ugdk::graphic::Canvas::SendUniform | ( | const std::string & | name, |
const TextureUnit & | unit | ||
) |
void ugdk::graphic::Canvas::SendVertexData | ( | const VertexData & | data, |
VertexType | type, | ||
size_t | offset, | ||
int | size = 2 , |
||
int | vertex_per_data = 1 |
||
) |
The VertexType should later be disabled using Manager::DisableVertexType.
|
inline |
math::Vector2D ugdk::graphic::Canvas::size | ( | ) | const |