FastUIDraw
Classes
Painter Backend

If one is making a painter backend, then this group provides the information, see particularly the enumerations in fastuidraw::PainterHeader, fastuidraw::PainterItemMatrix, fastuidraw::PainterClipEquations for how data is packed by fastuidraw::Painter. Part of the main library libFastUIDraw. More...

Classes

class  fastuidraw::AtlasColorBackingStoreBase
 Represents the interface for a backing store for color data of images. More...
 
class  fastuidraw::AtlasIndexBackingStoreBase
 Represents the interface for the backing store for index data of images. More...
 
class  fastuidraw::ColorStopAtlas
 A ColorStopAtlas is a common location to all color stop data of an application. Ideally, all color stop sequences are placed into a single ColorStopAtlas (changes of ColorStopAtlas force draw-call breaks). More...
 
class  fastuidraw::ColorStopBackingStore
 Represents the interface for the backing store for the texels of a sequence of color stops. The expectation is that linear filtering acting on the underlying backing store is all that is needed for correct color interpolation from a gradient interpolate. For example in GL, this can be GL_TEXTURE_1D_ARRAY with both minification and magnification filters set as GL_LINEAR. An implementation of the class does NOT need to be thread safe because the user of the backing store (ColorStopAtlas) performs calls to the backing store behind its own mutex. More...
 
class  fastuidraw::GlyphAtlas
 A GlyphAtlas is a common location to place glyph data of an application. Ideally, all glyph data is placed into a single GlyphAtlas. Methods of GlyphAtlas are thread safe, protected behind atomics and a mutex within the GlyphAtlas. More...
 
class  fastuidraw::GlyphAtlasBackingStoreBase
 GlyphAtlasStoreBase represents an interface to an aray of uint32_t values. More...
 
class  fastuidraw::PainterBackend
 A PainterBackend is an interface that defines the API-specific elements to implement Painter. A fixed PainterBackend will only be used by a single Painter. More...
 
class  fastuidraw::PainterBrushAdjust
 A PainterBrushAdjust holds the value for applying a tranformation to the brush position before it is handed off to brush shading. The transformation is shearing composited with a translation, i.e. the transformation is given by. More...
 
class  fastuidraw::PainterClipEquations
 A PainterClipEquations stores the clip equation for Painter. More...
 
class  fastuidraw::PainterDraw
 Store for attributes, indices of items and shared data of items for items to draw. Indices (stored in m_indices) are -ALWAYS- in groups of three where each group is a single triangle and each index is an index into m_attributes. The PainterDraw object is NOT thread safe, neither is its reference count. A PainterDraw object is used Painter to send attributer and index data to a Painter Backend. More...
 
class  fastuidraw::PainterDrawBreakAction
 A PainterDrawBreakAction represents an action on the 3D API between two indices to be fed the the GPU; a PainterDrawBreakAction will imply an draw break in the underlying 3D API. Typical example of such an action would be to bind a texture. More...
 
class  fastuidraw::PainterEngine
 A PainterEngine provides an interface to create Painter Backend derived objects. More...
 
class  fastuidraw::PainterHeader
 A PainterHeader represents the values of the header for the shaders to read to draw data. The header holds data that is common for all vertices and fragments for an item to draw, including with what shader and the data for the shader. More...
 
class  fastuidraw::PainterItemMatrix
 A PainterItemMatrix holds the value for the transformation from item coordinates to the coordinates in which the clipping rectangle applies. More...
 
class  fastuidraw::PainterShaderGroup
 A PainterShaderGroup gives to what groups the active shaders of a Painter belong. More...
 
class  fastuidraw::PainterShaderRegistrar
 A PainterShaderRegistrar is an interface that defines the assigning of PainterShader::ID() to a PainterShader. PainterShader objects are registered to a unique PainterShaderRegistrar for their lifetime. More...
 
class  fastuidraw::PainterSurface
 PainterSurface represents an interface to specify a buffer to which a PainterBackend renders content. More...
 

Detailed Description

If one is making a painter backend, then this group provides the information, see particularly the enumerations in fastuidraw::PainterHeader, fastuidraw::PainterItemMatrix, fastuidraw::PainterClipEquations for how data is packed by fastuidraw::Painter. Part of the main library libFastUIDraw.

Overview

The class fastuidraw::Painter implements canvas rendering using an implementation of the backend interface fastuidraw::PainterBackend to send data to a 3D API. The class fastuidraw::Painter packs data that is used by multiple triangles into fastuidraw::PainterDrawCommand::m_store (for example the current transformation). In implementing a backend, the shader fed to the GPU needs to correctly unpack this data. The location of the header of the data is stored in the attribute from the value fastuidraw::PainterDrawCommand::m_header_attributes. The header consists of fastuidraw::PainterHeader::header_size uint32_t values whose location relative to the start of the header and meaning are enumerated by fastuidraw::PainterHeader::offset_t. The header contains shader ID's and additional offsets to more data packed for a shader to unpack.