FastUIDraw
Classes
Painter Shaders

Painter Shaders defines the interface how to specify shaders used by Painter to render items. More...

Classes

class  fastuidraw::PainterBlendShader
 A PainterBlendShader represents a shader for performing blending operations. More...
 
class  fastuidraw::PainterBlendShaderSet
 A PainterBlendShaderSet represents a set of shaders for the blend modes enumerated by PainterEnums::blend_mode_t. More...
 
class  fastuidraw::PainterBrushShader
 A PainterBrushShader represents a shader for performing a custom brush coloring. More...
 
class  fastuidraw::PainterBrushShaderSet
 A PainterBrushShaderSet holds the PainterBrushShader objects to be used with the default brushes. More...
 
class  fastuidraw::PainterDashedStrokeShaderSet
 A PainterDashedStrokeShaderSet holds a collection of PainterStrokeShaderSet objects for the purpose of dashed stroking. The shaders within a PainterDashedStrokeShaderSet are expected to draw any caps of dashed stroking from using just the edge data. In particular, attributes/indices for caps induced by stroking are NOT given to a shader within a PainterDashedStrokeShaderSet. More...
 
class  fastuidraw::PainterFillShader
 A PainterFillShader holds the shaders for drawing filled paths. Anti-aliasing is accomplished by drawing 1-pixel thick rects about the boundary of the filled path. More...
 
class  fastuidraw::PainterGlyphShader
 A PainterGlyphShader holds a shader for each glyph_type. The shaders are to handle attribute data as packed by Glyph::pack_glyph(). More...
 
class  fastuidraw::PainterGradientBrushShader
 A PainterGradientBrushShader represents a set of brush shaders to to perform a gradient. Internally it containts four generic parent shaders: More...
 
class  fastuidraw::PainterImageBrushShader
 A PainterImageBrushShader represents a single PainterBrushShader together with sub-shaders of it that can be used to apply an Image. The sub-shader ID is used to describe the Image::type(), Image::format(), what filtering and mipmapping to apply to the image data. More...
 
class  fastuidraw::PainterItemCoverageShader
 A PainterItemCoverageShader represents a shader to draw an item to a coverage buffer (see PainterSurface::deferred_coverage_buffer_type). Typically such a shader represents both a vertex and fragment shader. More...
 
class  fastuidraw::PainterItemShader
 A PainterItemShader represents a shader to draw an item (typically a vertex and fragment shader pair). More...
 
class  fastuidraw::PainterShader
 A PainterShader encapsulates how to draw or blend. More...
 
class  fastuidraw::PainterShaderSet
 A PainterShaderSet provides shaders for blending and drawing each of the item types glyphs, stroking paths and filling paths. More...
 
class  fastuidraw::PainterStrokeShader
 A PainterStrokeShader holds shaders for stroking. It is to hold shaders for stroking paths linearly or via arcs with and without anti-aliasing along with meta-data to inform what shading is faster. More...
 
class  fastuidraw::StrokingDataSelectorBase
 A StrokingDataSelector is an interface to assist Painter to select correct LOD for rounded joins and caps when drawing rounded joins and caps. In addition it also informs Painter if stroking via arcs is possible with the stroking parameters. More...
 

Detailed Description

Painter Shaders defines the interface how to specify shaders used by Painter to render items.

There are four types of shaders

Each of these shaders can fetch shader-data to modify their processing (for example an item shader for stroking a path would fetch the stroking width in the vertex shader). The classes for realizing the shader-data are

Each of these objects can be passed to a fastuidraw::Painter drawing method by address with the class fastuidraw::PainterData. In addition, if a value is to be reused in several drawing calls to fastuidraw::Painter, one can use the interface of fastuidraw::PainterPackedValuePool (fetched from fastuidraw::Painter::packed_value_pool()) to realize a fastuidraw::PainterPackedValue which represents the value immutably packed for the GPU in such a way that its packing into the GPU can be dramatically reused within a frame.