> All members, including inherited
◆ boxShadow()
void SoftwareRenderer::boxShadow |
( |
glm::vec2 | position, |
|
|
glm::vec2 | size, |
|
|
float | blurRadius, |
|
|
const AColor & | color ) |
|
overridevirtual |
- Parameters
-
position | position |
size | rectangle size |
blurRadius | blur radius |
color | shadow color |
Implements IRenderer.
◆ boxShadowInner()
void SoftwareRenderer::boxShadowInner |
( |
glm::vec2 | position, |
|
|
glm::vec2 | size, |
|
|
float | blurRadius, |
|
|
float | spreadRadius, |
|
|
float | borderRadius, |
|
|
const AColor & | color, |
|
|
glm::vec2 | offset ) |
|
overridevirtual |
- Parameters
-
position | position |
size | rectangle size |
blurRadius | blur radius |
spreadRadius | spread (offset) radius |
borderRadius | border radius of the rectangle. |
color | shadow color |
offset | shadow offset. Unlike outer shadow (ctx.render.boxShadow), the offset is passed to the shader instead of a simple rectangle position offset. |
Implements IRenderer.
◆ createNewTexture()
_unique< ITexture > SoftwareRenderer::createNewTexture |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ getProjectionMatrix()
glm::mat4 SoftwareRenderer::getProjectionMatrix |
( |
| ) |
const |
|
overridevirtual |
◆ lines() [1/2]
- Parameters
-
brush | brush |
points | polyline points |
style | style |
width | line width |
Implements IRenderer.
◆ lines() [2/2]
void SoftwareRenderer::lines |
( |
const ABrush & | brush, |
|
|
AArrayView< std::pair< glm::vec2, glm::vec2 > > | points, |
|
|
const ABorderStyle & | style, |
|
|
AMetric | width ) |
|
overridevirtual |
- Parameters
-
brush | brush |
points | line points |
style | style |
width | line width |
Implements IRenderer.
◆ newMultiStringCanvas()
- Returns
- a new instance of
IMultiStringCanvas
Implements IRenderer.
◆ newRenderViewToTexture()
- Returns
- A new instance. Can return null if unsupported.
Implements IRenderer.
◆ points()
void SoftwareRenderer::points |
( |
const ABrush & | brush, |
|
|
AArrayView< glm::vec2 > | points, |
|
|
AMetric | size ) |
|
overridevirtual |
- Parameters
-
brush | brush |
points | points |
size | point size |
Implements IRenderer.
◆ popMaskAfter()
void SoftwareRenderer::popMaskAfter |
( |
| ) |
|
|
overridevirtual |
Stencil buffer should not be changed after calling this function. Should be called after the popMaskBefore
function.
Implements IRenderer.
◆ popMaskBefore()
void SoftwareRenderer::popMaskBefore |
( |
| ) |
|
|
overridevirtual |
Stencil pixel is decreased by each affected pixel. Should be called before the popMaskAfter
function.
Implements IRenderer.
◆ prerenderString()
- Parameters
-
position | string's top left point |
text | string to prerender |
fs | font style |
- Returns
- an instance of IPrerenderedString
Implements IRenderer.
◆ pushMaskAfter()
void SoftwareRenderer::pushMaskAfter |
( |
| ) |
|
|
overridevirtual |
Stencil buffer should not be changed after calling this function. Should be called after the pushMaskBefore
function.
Implements IRenderer.
◆ pushMaskBefore()
void SoftwareRenderer::pushMaskBefore |
( |
| ) |
|
|
overridevirtual |
Stencil pixel is increased by each affected pixel. Should be called before the pushMaskAfter
function.
Implements IRenderer.
◆ putPixel()
void SoftwareRenderer::putPixel |
( |
glm::ivec2 | position, |
|
|
AColor | color, |
|
|
AOptional< Blending > | blending = std::nullopt ) |
|
inlinenoexcept |
Draws a pixel onto the software framebuffer following the stencil and blending rules.
- Sneaky assertions
position
is inside the framebuffer.
- Parameters
-
position | position. An assertion is triggered if position is not inside the framebuffer. |
color | color. |
blending | blending. Optional. Cheaper. When set, the one set by the setBlending function is ignored. |
◆ rectangle()
void SoftwareRenderer::rectangle |
( |
const ABrush & | brush, |
|
|
glm::vec2 | position, |
|
|
glm::vec2 | size ) |
|
overridevirtual |
- Parameters
-
brush | brush to use |
position | rectangle position (px) |
size | rectangle size (px) |
Implements IRenderer.
◆ rectangleBorder()
void SoftwareRenderer::rectangleBorder |
( |
const ABrush & | brush, |
|
|
glm::vec2 | position, |
|
|
glm::vec2 | size, |
|
|
float | lineWidth ) |
|
overridevirtual |
- Parameters
-
brush | brush to use |
position | rectangle position (px) |
size | rectangle size (px) |
lineWidth | border line width (px) |
Implements IRenderer.
◆ roundedRectangle()
void SoftwareRenderer::roundedRectangle |
( |
const ABrush & | brush, |
|
|
glm::vec2 | position, |
|
|
glm::vec2 | size, |
|
|
float | radius ) |
|
overridevirtual |
- Parameters
-
brush | brush to use |
position | rectangle position (px) |
size | rectangle size (px) |
radius | corner radius (px) |
Implements IRenderer.
◆ roundedRectangleBorder()
void SoftwareRenderer::roundedRectangleBorder |
( |
const ABrush & | brush, |
|
|
glm::vec2 | position, |
|
|
glm::vec2 | size, |
|
|
float | radius, |
|
|
int | borderWidth ) |
|
overridevirtual |
- Parameters
-
brush | brush to use |
position | rectangle position (px) |
size | rectangle size (px) |
radius | corner radius (px) |
borderWidth | border line width (px) |
Implements IRenderer.
◆ setBlending()
void SoftwareRenderer::setBlending |
( |
Blending | blending | ) |
|
|
overridevirtual |
- Parameters
-
blending | new blending mode |
Implements IRenderer.
◆ setWindow()
void SoftwareRenderer::setWindow |
( |
AWindowBase * | window | ) |
|
|
overridevirtual |
◆ squareSector()
void SoftwareRenderer::squareSector |
( |
const ABrush & | brush, |
|
|
const glm::vec2 & | position, |
|
|
const glm::vec2 & | size, |
|
|
AAngleRadians | begin, |
|
|
AAngleRadians | end ) |
|
overridevirtual |
- Parameters
-
brush | brush to use |
position | rectangle position (px) |
size | rectangle size (px) |
begin | begin angle of the sector |
end | end angle of the sector |
The method can be used as mask to ctx.render.roundedRect, creating arc shape.
Implements IRenderer.
◆ string()
void SoftwareRenderer::string |
( |
glm::vec2 | position, |
|
|
const AString & | string, |
|
|
const AFontStyle & | fs ) |
|
overridevirtual |
- Parameters
-
position | string's top left point |
string | string to render |
fs | font style (optional) |
- Note
- This function is dramatically inefficient since it does symbol lookup for every character is the
string
and does GPU buffer allocations. If you want to render the same string for several times (frames), consider using the IRenderer::prerenderString function or high level views (such as ALabel) instead.
Implements IRenderer.