|
|
| GraphicsRender2D (std::shared_ptr< STK::ShaderProgramManager > shader_mgr, std::shared_ptr< STK::BufferManager > buffer_mgr=nullptr) |
| |
| 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) |
| | Redraw all graphics items with the given projection and view matrix.
|
| |
|
void | drawItems (const STK::Matrix4x4f &pj, const STK::Matrix4x4f &vm, const STK::Viewport &vp, const std::vector< std::shared_ptr< STK::RenderItem2D > > &items) |
| | Draw all items in the list.
|
| |
| 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 |
| |
|
|
std::string | lineShaderName = "LineSimple2D" |
| |
|
std::string | lineTexturedShaderName = "LineTextured2D" |
| |
|
std::string | polygonShaderName = "DefaultNoLighting" |
| |
|
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