Base class for rendering.
More...
#include <AUI/Render/IRenderer.h>
Renderer is shared between windows. It's expected to share resources (if any). Thus, it does not perform any platform specific routines.
- See also
- IRenderingContext
> All members, including inherited
◆ backdrops()
void IRenderer::backdrops |
( |
glm::ivec2 | position, |
|
|
glm::ivec2 | size, |
|
|
std::span< ass::Backdrop::Any > | backdrops ) |
- Parameters
-
position | rectangle position (px) |
size | rectangle size (px) |
backdrops | array of backdrop effects. Impl might apply optimizations on using several effects at once. |
Implementation might draw stub (i.e., gray rectangle) instead of drawing complex backdrop effects.
◆ boxShadow()
virtual void IRenderer::boxShadow |
( |
glm::vec2 | position, |
|
|
glm::vec2 | size, |
|
|
float | blurRadius, |
|
|
const AColor & | color ) |
|
pure virtual |
◆ boxShadowInner()
virtual void IRenderer::boxShadowInner |
( |
glm::vec2 | position, |
|
|
glm::vec2 | size, |
|
|
float | blurRadius, |
|
|
float | spreadRadius, |
|
|
float | borderRadius, |
|
|
const AColor & | color, |
|
|
glm::vec2 | offset ) |
|
pure virtual |
- 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. |
Implemented in OpenGLRenderer, and SoftwareRenderer.
◆ line()
- Performance note
- if you want to drawElements multiple lines, consider using
ARender::lines
function instead.
◆ lines() [1/4]
◆ lines() [2/4]
- Parameters
-
brush | brush |
points | polyline points |
style | style |
◆ lines() [3/4]
virtual void IRenderer::lines |
( |
const ABrush & | brush, |
|
|
AArrayView< std::pair< glm::vec2, glm::vec2 > > | points, |
|
|
const ABorderStyle & | style, |
|
|
AMetric | width ) |
|
pure virtual |
◆ lines() [4/4]
- Parameters
-
brush | brush |
points | line points |
style | style |
◆ newMultiStringCanvas()
◆ newRenderViewToTexture()
|
nodiscardpure virtualnoexcept |
◆ points()
virtual void IRenderer::points |
( |
const ABrush & | brush, |
|
|
AArrayView< glm::vec2 > | points, |
|
|
AMetric | size ) |
|
pure virtual |
◆ popMaskAfter()
virtual void IRenderer::popMaskAfter |
( |
| ) |
|
|
pure virtual |
Stencil buffer should not be changed after calling this function. Should be called after the popMaskBefore
function.
Implemented in OpenGLRenderer, and SoftwareRenderer.
◆ popMaskBefore()
virtual void IRenderer::popMaskBefore |
( |
| ) |
|
|
pure virtual |
Stencil pixel is decreased by each affected pixel. Should be called before the popMaskAfter
function.
Implemented in OpenGLRenderer, and SoftwareRenderer.
◆ prerenderString()
◆ pushMaskAfter()
virtual void IRenderer::pushMaskAfter |
( |
| ) |
|
|
pure virtual |
Stencil buffer should not be changed after calling this function. Should be called after the pushMaskBefore
function.
Implemented in OpenGLRenderer, and SoftwareRenderer.
◆ pushMaskBefore()
virtual void IRenderer::pushMaskBefore |
( |
| ) |
|
|
pure virtual |
Stencil pixel is increased by each affected pixel. Should be called before the pushMaskAfter
function.
Implemented in OpenGLRenderer, and SoftwareRenderer.
◆ rectangle()
virtual void IRenderer::rectangle |
( |
const ABrush & | brush, |
|
|
glm::vec2 | position, |
|
|
glm::vec2 | size ) |
|
pure virtual |
◆ rectangleBorder()
virtual void IRenderer::rectangleBorder |
( |
const ABrush & | brush, |
|
|
glm::vec2 | position, |
|
|
glm::vec2 | size, |
|
|
float | lineWidth = 1.f ) |
|
pure virtual |
- Parameters
-
brush | brush to use |
position | rectangle position (px) |
size | rectangle size (px) |
lineWidth | border line width (px) |
Implemented in OpenGLRenderer, and SoftwareRenderer.
◆ rotate() [1/2]
◆ rotate() [2/2]
void IRenderer::rotate |
( |
const glm::vec3 & | axis, |
|
|
AAngleRadians | angle ) |
|
inline |
- Parameters
-
axis | axis |
angle | angle to rotate |
◆ roundedRectangle()
virtual void IRenderer::roundedRectangle |
( |
const ABrush & | brush, |
|
|
glm::vec2 | position, |
|
|
glm::vec2 | size, |
|
|
float | radius ) |
|
pure virtual |
◆ roundedRectangleBorder()
virtual void IRenderer::roundedRectangleBorder |
( |
const ABrush & | brush, |
|
|
glm::vec2 | position, |
|
|
glm::vec2 | size, |
|
|
float | radius, |
|
|
int | borderWidth ) |
|
pure virtual |
◆ setBlending()
virtual void IRenderer::setBlending |
( |
Blending | blending | ) |
|
|
pure virtual |
◆ setColor()
void IRenderer::setColor |
( |
const AColor & | color | ) |
|
|
inline |
◆ setColorForced()
void IRenderer::setColorForced |
( |
const AColor & | color | ) |
|
|
inline |
◆ setTransform()
void IRenderer::setTransform |
( |
const glm::mat4 & | transform | ) |
|
|
inline |
- Parameters
-
transform | transform matrix |
◆ setTransformForced()
void IRenderer::setTransformForced |
( |
const glm::mat4 & | transform | ) |
|
|
inline |
- Parameters
-
transform | transform matrix |
◆ setWindow()
virtual void IRenderer::setWindow |
( |
AWindowBase * | window | ) |
|
|
inlinevirtual |
◆ squareSector()
virtual void IRenderer::squareSector |
( |
const ABrush & | brush, |
|
|
const glm::vec2 & | position, |
|
|
const glm::vec2 & | size, |
|
|
AAngleRadians | begin, |
|
|
AAngleRadians | end ) |
|
pure virtual |
- 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.
Implemented in OpenGLRenderer, and SoftwareRenderer.
◆ string()
virtual void IRenderer::string |
( |
glm::vec2 | position, |
|
|
const AString & | string, |
|
|
const AFontStyle & | fs = {} ) |
|
pure virtual |
◆ stub()
void IRenderer::stub |
( |
glm::vec2 | position, |
|
|
glm::vec2 | size ) |
|
protected |
This can be used if implementation does not support or can't draw complex effects (i.e., blur)
◆ translate()
void IRenderer::translate |
( |
const glm::vec2 & | offset | ) |
|
|
inline |
- Parameters
-
offset | offset in pixels to translate. |