|
|
| GraphicsRender2D (std::shared_ptr< STK::ShaderProgramManager > shader_mgr, std::shared_ptr< STK::BufferManager > buffer_mgr=nullptr, bool use_premultiplied_alpha=false) |
| |
| bool | initShaders () |
| |
|
const std::shared_ptr< STK::ShaderProgramManager > & | getShaderManager () const |
| |
|
void | bindShader (const std::shared_ptr< STK::ShaderProgram > &shader) |
| |
|
void | applyStencilMask (const std::shared_ptr< STK::RenderItem2D > &i) |
| |
|
bool | initFrameUniforms (const std::shared_ptr< STK::ShaderProgram > &shader, const STK::Matrix4x4f &pj, const STK::Viewport &vp) |
| |
|
void | drawPolyline (STK::PolylineRender2D &l, const STK::Matrix4x4f &vm) |
| |
|
void | drawPolygon (STK::PolygonRender2D &p, const STK::Matrix4x4f &vm) |
| |
|
void | drawEllipse (STK::EllipseRender2D &e, const STK::Matrix4x4f &vm) |
| |
|
void | drawText (STK::TextRenderItem &t, const STK::Matrix4x4f &vm) |
| |
|
void | drawTextSDF (STK::TextRenderItemSDF &t, const STK::Matrix4x4f &vm) |
| |
|
void | drawIcon (STK::IconRenderItem &icon, const STK::Matrix4x4f &vm) |
| |
| void | addGraphicsItem (std::shared_ptr< STK::RenderItem2D > l) |
| |
|
void | removeGraphicsItem (const std::shared_ptr< STK::RenderItem2D > &i) |
| |
| void | clearGraphicsItems () |
| |
| void | redraw (const STK::Matrix4x4f &pj, const STK::Matrix4x4f &vm, const STK::Viewport &vp) |
| |
| void | drawItems (const STK::Matrix4x4f &pj, const STK::Matrix4x4f &vm, const STK::Viewport &vp, const std::vector< std::shared_ptr< STK::RenderItem2D > > &items) |
| |
| void | cleanup () |
| |
| void | setViewportAngle (float vp_angle) |
| |
|
float | getViewportAngle () const |
| |
|
void | setOpacity (float opacity) |
| |
|
float | getOpacity () const |
| |
|
void | drawUnitQuad () const |
| | Utility function to draw a simple unit quad with the currently bound shader.
|
| |
| bool | hitTest (const STK::Matrix4x4f &vm, const STK::Viewport &vp, const std::vector< std::shared_ptr< STK::RenderItem2D > > &renderItems, int x, int y, int pickRadius=3) |
| | Hit test a list of graphics items. This method will check if the given position in pixel coordinates intersects the graphics of any of the given render items, and can be used for example for mouse picking.
|
| |
|
const std::shared_ptr< STK::BufferManager > & | getBufferManager () const |
| |
| void | setUsePremultipliedAlpha (bool usePremultipliedAlpha) |
| |
|
bool | getUsePremultipliedAlpha () const |
| |
|
|
std::string | lineShaderName = "LineSimple2D" |
| |
|
std::string | lineTexturedShaderName = "LineTextured2D" |
| |
|
std::string | polygonShaderName = "Polygon2D" |
| |
|
std::string | polygonTextureShaderName = "PolygonTexture2D" |
| |
|
std::string | ellipseShaderName = "EllipseSimple2D" |
| |
|
std::string | ellipseTextureShaderName = "EllipseTexture2D" |
| |
|
std::string | ellipseLineShaderName = "EllipseLine2D" |
| |
|
std::string | textShaderName = "TextLabel" |
| |
|
std::string | textBackgroundShaderName = "TextBackground" |
| |
|
std::string | textOutlineShaderName = "TextLabelSDF" |
| |
|
std::string | iconShaderName = "Icon2D" |
| |
GraphicsRender2D - Efficient rendering of 2D graphics