FastUIDraw
Namespaces | Classes | Typedefs | Enumerations | Functions
fastuidraw Namespace Reference

all classes and functions of FastUIDraw are in the namespace fastuidraw. More...

Namespaces

 ArcStrokedPointPacking
 Namespce to encompass packing values and functions of path data for stroking using ArcStrokedPoint.
 
 CharacterEncoding
 A CharacterEncoding is used to decide how to interpret characters. The value itself is just a 32-bit value that mirrors the FT_Encoding of FreeType.
 
 gl
 Namespace to encapsulate GL backend end implementation, utility functions and utility classes. Part of the GL backend libraries, libFastUIDrawGL and libFastUIDrawGLES.
 
 gl_binding
 Provides interface for application to use GL where function pointers are auto-resolved transparently and under debug provides error checking. Built as a part of a seperate library; for GL it is libNGL; for GLES it is NGLES. The header defines for each GL/GLES function, glFoo, the macro fastuidraw_glFoo.
 
 glsl
 Namespace to encapsulate shader building to GLSL shaders, part of the main library libFastUIDraw.
 
 GlyphGenerateParams
 GlyphGenerateParams encapsulates values to determine how glyphs are to be produced. These values cannot be changed if there are any FontBase derived objects alive.
 
 StrokedPointPacking
 Namespace to encompass packing values and functions of path data for stroking using StrokedPoint.
 

Classes

class  APICallbackSet
 
class  ArcStrokedPoint
 An ArcStrokedPoint holds the data for a point of stroking where the segments can be arcs of a circle. The upshot is that a fragment shader will determine per-pixel coverage. In addition, the data is so that changing the stroking width or miter limit does not change the stroking data. More...
 
class  AtlasColorBackingStoreBase
 Represents the interface for a backing store for color data of images. More...
 
class  AtlasIndexBackingStoreBase
 Represents the interface for the backing store for index data of images. More...
 
class  BlendMode
 Class to hold the blend mode as exposed by typical 3D APIs. More...
 
class  c_array
 A c_array is a wrapper over a C pointer with a size parameter to facilitate bounds checking and provide an STL-like iterator interface. More...
 
class  ColorStop
 A ColorStop is a pair consisting of an RGBA value and a place. The value of the place is a floating point value in the range [0, 1]. More...
 
class  ColorStopArray
 A ColorStopArray is a sequence of ColorStop values used to define the color stops of a gradient. More...
 
class  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  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  ColorStopSequence
 A ColorStopSequence is a ColorStopArray on a ColorStopAtlas. A ColorStopAtlas is backed by a 1D texture array with linear filtering. The values of ColorStop::m_place are discretized. Values in between the ColorStop 's of a ColorStopArray are interpolated. More...
 
class  CustomFillRuleBase
 Base class to specify a custom fill rule. More...
 
class  CustomFillRuleFunction
 Class to specify a custom fill rule from a function. More...
 
class  DataBuffer
 DataBuffer is an implementation of DataBufferBase where the data is directly backed by memory. More...
 
class  DataBufferBackingStore
 Represents a buffer directly stored in memory. More...
 
class  DataBufferBase
 Base class for passing around buffers of data; derived classes have the responsibility of maintaining storage cleanup at destruction. More...
 
class  false_type
 Class for type traits to indicate true. Functionally, a simplified version of std::false_type. More...
 
class  FilledPath
 A FilledPath represents the data needed to draw a path filled. It contains -all- the data needed to fill a path regardless of the fill rule. More...
 
class  FontBase
 FontBase provides an interface for a font to generate glyph rendering data. More...
 
class  FontDatabase
 A FontDatabase performs the act of font selection and glyph selection. It uses the values of FontProperties (except for FontProperties::source_label()) to select suitable font or fonts. More...
 
class  FontFreeType
 A FontFreeType implements the interface of FontBase from a scalable font loaded by libfreetype. More...
 
class  FontMetrics
 Represents various metric values global to an entire font. More...
 
class  FontProperties
 Represents defining properties of a font used by FontDatabase to perform font merging. More...
 
class  FreeTypeFace
 A FreeTypeFace wraps an FT_Face object of the FreeType library together with a mutex in a reference counted object. More...
 
class  FreeTypeLib
 A FreeTypeLib wraps an FT_Library object of the FreeType library together with a mutex in a reference counted object. More...
 
class  Glyph
 A Glyph is essentially an opaque pointer to data for rendering and performing layout of a glyph. More...
 
class  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  GlyphAtlasBackingStoreBase
 GlyphAtlasStoreBase represents an interface to an aray of uint32_t values. More...
 
class  GlyphAtlasProxy
 An GlyphAtlasProxy is a proxy for a GlyphAtlas; one can allocate through it. Internally it tracks all that was allocated with it. More...
 
class  GlyphAttribute
 A GlyphAttribute represents one Painter Attribute per glyph corner. More...
 
class  GlyphAttributePacker
 A GlyphAttributePacker provides an interface to customize how glyph attribute and index data is realized by a GlyphRun and GlyphSequence. More...
 
class  GlyphCache
 A GlyphCache represents a cache of glyphs and manages the uploading of the data to a GlyphAtlas. The methods of GlyphAtlas are thread safe because it maintains an internal mutex lock for the durations of its methods. More...
 
class  GlyphMetrics
 A GlyphMetrics provides information on the metrics of a glyph, all the values are in units of the font glyph. The function units_per_EM() provides the conversion factor to pixel coordinates via $PixelCoordinates = FontCoordinates * PixelSize / units_per_EM()$ where PixelSize is the pixel size in which one is to render the text. More...
 
class  GlyphMetricsValue
 A GlyphMetricsValue is to be used by a FontBase derived object to specify the values of a GlyphMetrics object. More...
 
class  GlyphRenderCostInfo
 
class  GlyphRenderData
 GlyphRenderData provides an interface to specify data used for rendering glyphs and to pack that data onto a GlyphAtlas. More...
 
class  GlyphRenderDataBandedRays
 
class  GlyphRenderDataRestrictedRays
 
class  GlyphRenderDataTexels
 A GlyphRenderDataTexels holds texel data for rendering a glyph. Such texel data can be for both distance field and coverage glyph rendeding. More...
 
class  GlyphRenderer
 Specifies how to render a glyph. More...
 
class  GlyphRun
 A GlyphRun represents a sequence of glyph codes with positions. A GlyphRun provides an interface to grab the glyph-codes realized as different renderers for the purpose of rendering text in response to the transformation that a Painter currently has. In contrast to a GlyphSequence, a GlyphRun does NOT maintain a hierarchy to perform culling. However, it does provide an interface to select continuous subsets of the glyphs for the purporse of rendering. In addition, since it does not carry a hierarchy for culling, it is also a lighter weight object than GlyphSequence. Like GlyphSequence, the methods of GlyphRun are re-entrant but not thread safe, i.e. if an application uses the same GlyphRun from multiple threads it needs to explicitely handle locking itself when using it. More...
 
class  GlyphSequence
 A GlyphSequence represents a sequence of glyph codes with positions. A GlyphSequence provides an interface to grab the glyph-codes realized as different renderers for the purpose of rendering text in response to the transformation that a Painter currently has. A GlyphSequence maintains a hierarchy so that Painter can quickly cull glyphs that are not visible. The methods of GlyphSequence are re-entrant but not thread safe, i.e. if an application uses the same GlyphSequence from multiple threads it needs to explicitely handle locking itself when using it. More...
 
class  GlyphSource
 
class  gpu_dirty_state
 
class  Image
 An Image represents an image comprising of RGBA8 values. The texel values themselves are stored in a ImageAtlas. More...
 
class  ImageAtlas
 An ImageAtlas is a common location to place images of an application. More...
 
class  ImageSourceBase
 ImageSourceBase defines the inteface for copying texel data from a source (CPU memory, a file, etc) to an AtlasColorBackingStoreBase derived object. More...
 
class  ImageSourceCArray
 An implementation of ImageSourceBase where the data is backed by a c_array<const u8vec4> data. More...
 
class  is_const
 
class  matrix3x3
 A representation of a 3x3 matrix, that in addition to the NxN matrix functionality provides function for calculating the determinant. More...
 
class  matrixNxM
 A generic matrix class. The operator() is overloaded to access elements of the matrix as follows: More...
 
class  Mutex
 
class  noncopyable
 Class for which copy ctor and assignment operator are private functions. More...
 
class  orthogonal_projection_params
 An orthogonal_projection_params holds the data to describe an orthogonal projection matrix without perspective. More...
 
class  Painter
 Painter implements a canvas rendering interface. More...
 
class  PainterAttribute
 The attribute data generated/filled by Painter. Attribute data is sent to 3D API as raw bits with the expectation that shaders will cast the bits to the appropiate types for themselves. More...
 
class  PainterAttributeData
 PainterAttributeData represents the attribute and index data ready to be consumed by a Painter. Data is organized into individual chuncks that can be drawn seperately. More...
 
class  PainterAttributeDataFiller
 A PainterAttributeDataFiller is the interfaceto fill the data held by a PainterAttributeData. More...
 
class  PainterAttributeWriter
 Provides an interface to write attribute and index data when a simple copy of data from c_array objects is not sufficient. More...
 
class  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  PainterBlendShader
 A PainterBlendShader represents a shader for performing blending operations. More...
 
class  PainterBlendShaderData
 PainterBlendShaderData holds custom data for blend shaders. More...
 
class  PainterBlendShaderSet
 A PainterBlendShaderSet represents a set of shaders for the blend modes enumerated by PainterEnums::blend_mode_t. More...
 
class  PainterBrush
 A PainterBrush defines a brush for painting via Painter. More...
 
class  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  PainterBrushEnums
 Class to contain various enumerations needed for describing a brush. More...
 
class  PainterBrushShader
 A PainterBrushShader represents a shader for performing a custom brush coloring. More...
 
class  PainterBrushShaderData
 Base class to hold custom data for custom brush shaders. More...
 
class  PainterBrushShaderSet
 A PainterBrushShaderSet holds the PainterBrushShader objects to be used with the default brushes. More...
 
class  PainterClipEquations
 A PainterClipEquations stores the clip equation for Painter. More...
 
class  PainterCustomBrush
 A PainterCustomBrush is just a conveniance to wrap a pointer to a PainterBrushShader together with a PainterDataValue<PainterBrushShaderData>. More...
 
class  PainterDashedStrokeParams
 Class to specify dashed stroking parameters, data is packed as according to PainterDashedStrokeParams::stroke_data_offset_t. Data for dashing is packed [TODO describe]. More...
 
class  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  PainterData
 A PainterData provides the data for how for a Painter to draw content. More...
 
class  PainterDataValue
 Element of PainterData to hold shader data either reference directly to unpacked data or to reuseable packed data. More...
 
class  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  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  PainterEffect
 A PainterEffect represents the interface to define and effect to apply to image data. At its core, it is made up of a sequence of passes. More...
 
class  PainterEffectBrush
 A PainterEffectBrush represents applying a brush. The PainterEffectParams derived object to use with a PainterEffectBrush is PainterEffectBrushParams. More...
 
class  PainterEffectBrushParams
 
class  PainterEffectParams
 
class  PainterEngine
 A PainterEngine provides an interface to create Painter Backend derived objects. More...
 
class  PainterEnums
 Class to encapsulate enumerations used in Painter interface, part of the main library libFastUIDraw. More...
 
class  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  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  PainterGradientBrushShader
 A PainterGradientBrushShader represents a set of brush shaders to to perform a gradient. Internally it containts four generic parent shaders: More...
 
class  PainterGradientBrushShaderData
 A PainterGradientBrushShaderData defines the PainterBrushShaderData that the shaders of a PainterGradientBrushShader consume. It specifies what ColorStopSequence to use together with the geometric properties of the gradient. More...
 
class  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  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  PainterImageBrushShaderData
 A PainterImageBrushShaderData defines the PainterBrushShaderData that the shaders of a PainterImageBrushShader consume. It specifies what Image and what rectangular region within it from which to source image data. More...
 
class  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  PainterItemMatrix
 A PainterItemMatrix holds the value for the transformation from item coordinates to the coordinates in which the clipping rectangle applies. More...
 
class  PainterItemShader
 A PainterItemShader represents a shader to draw an item (typically a vertex and fragment shader pair). More...
 
class  PainterItemShaderData
 PainterItemShaderData holds custom data for item shaders. More...
 
class  PainterPackedValue
 A PainterPackedValue represents a handle to an object that stores packed state data and tracks if that underlying data is already is already copied to PainterDraw::m_store. More...
 
class  PainterPackedValueBase
 (Private) base class used for PainterPackedValue More...
 
class  PainterPackedValuePool
 A PainterPackedValuePool can be used to create PainterPackedValue objects. More...
 
class  PainterShader
 A PainterShader encapsulates how to draw or blend. More...
 
class  PainterShaderData
 Common base class to PainterItemShaderData, PainterBrushShaderData and PainterBlendShaderData to hold shader data for custom shaders. More...
 
class  PainterShaderGroup
 A PainterShaderGroup gives to what groups the active shaders of a Painter belong. More...
 
class  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  PainterShaderSet
 A PainterShaderSet provides shaders for blending and drawing each of the item types glyphs, stroking paths and filling paths. More...
 
class  PainterStrokeParams
 Class to specify stroking parameters, data is packed as according to PainterStrokeParams::stroke_data_offset_t. More...
 
class  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  PainterSurface
 PainterSurface represents an interface to specify a buffer to which a PainterBackend renders content. More...
 
class  PartitionedTessellatedPath
 A PartitionedTessellatedPath represents partitioning a TessellatedPath for quick computation of what TessellatedPath::segment intersect a region. More...
 
class  Path
 A Path represents a collection of PathContour objects. More...
 
class  PathContour
 An PathContour represents a single contour within a Path. More...
 
class  PathDashEffect
 
class  PathEffect
 A PathEffect allows one to process a sequence of TessellatedPath::segment_chain, TessellatedPath::join and TessellatedPath::cap values to produce a new sequence of such values for the purpose of effecting stroking. More...
 
class  PathEnums
 Class to encapsulate enumerations used by Path and PathContour. More...
 
class  projection_params
 A projection_params holds the data to describe a projection matrix with perspective. More...
 
class  range_type
 A class reprenting the STL range [m_begin, m_end). More...
 
class  RectEnums
 
class  RectT
 
class  reference_count_atomic
 Reference counter that is thread safe by having increment and decrement operations by atomic operations, this is usually faster (and much faster) than reference_count_mutex. More...
 
class  reference_count_non_concurrent
 Reference counter that is NOT thread safe. More...
 
class  reference_counted
 Defines default reference counting base classes. More...
 
class  reference_counted_base
 Base class to use for reference counted objects, for using reference_counted_ptr. See also reference_counted. Object deletion (when the reference count goes to zero) is performed via FASTUIDRAWdelete. As a consequence of using FASTUIDRAWdelete, objects must be created with FASTUIDRAWnew. More...
 
class  reference_counted_ptr
 A wrapper over a pointer to implement reference counting. More...
 
class  remove_const
 
class  remove_const< T const >
 
class  resource_base
 A common base class to use for resources that need to be saved opaquely. More...
 
class  RoundedRect
 
class  same_const
 
class  ShaderFilledPath
 A ShaderFilledPath represents a path that is drawn as a rectangle where the fragment shader acting on the rectangle performs the coverage computation of each pixel. Generally speaking, one should only fill paths via a ShaderFilledPath when a filled path when drawn has very high density of edges. More...
 
class  static_resource
 Provided as a conveniance. The ctor calls generate_static_resource(). More...
 
class  string_array
 
class  StrokedPath
 A StrokedPath represents the data needed to draw a path stroked. It contains -all- the data needed to stroke a path regardless of stroking style. In particular, for a given TessellatedPath, one only needs to construct a StrokedPath once regardless of how one strokes the original path for drawing. More...
 
class  StrokedPoint
 A StrokedPoint holds the data for a point of stroking where all segments are line segments (coming from curve tessellation). The upshot is that the fragment shader does NOT perform any coverage computation for non-dashed stroking. In addition, the data is so that changing the stroking width or miter limit does not change the stroking data. More...
 
class  StrokingAttributeWriter
 A StrokingAttributeWriter is an implementation of PainterAttributeWriter for the purpose of stroking a path. More...
 
class  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...
 
class  StrokingStyle
 
class  TessellatedPath
 An TessellatedPath represents the tessellation of a Path into line segments and arcs. More...
 
class  true_type
 Class for type traits to indicate true. Functionally, a simplified version of std::true_type. More...
 
class  unvecN
 
class  vecN
 vecN is a simple static array class with no virtual functions and no memory overhead. Supports runtim array index checking and STL style iterators via pointer iterators. More...
 

Typedefs

typedef const char * c_string
 Conveniant typedef for C-style strings.
 
typedef vecN< double, 1 > dvec1
 
typedef vecN< double, 2 > dvec2
 
typedef vecN< double, 3 > dvec3
 
typedef vecN< double, 4 > dvec4
 
typedef matrixNxM< 2, 2, float > float2x2
 Convenience typedef to matrixNxM<2, float>
 
typedef matrix3x3< float > float3x3
 Convenience typedef to matrix3x3<float>
 
typedef orthogonal_projection_params< float > float_orthogonal_projection_params
 Convenience typedef for orthogonal_projection_params<float>
 
typedef projection_params< float > float_projection_params
 Convenience typedef for projection_params<float>
 
typedef vecN< int16_t, 1 > i16vec1
 
typedef vecN< int16_t, 2 > i16vec2
 
typedef vecN< int16_t, 3 > i16vec3
 
typedef vecN< int16_t, 4 > i16vec4
 
typedef vecN< int32_t, 1 > i32vec1
 
typedef vecN< int32_t, 2 > i32vec2
 
typedef vecN< int32_t, 3 > i32vec3
 
typedef vecN< int32_t, 4 > i32vec4
 
typedef vecN< int64_t, 1 > i64vec1
 
typedef vecN< int64_t, 2 > i64vec2
 
typedef vecN< int64_t, 3 > i64vec3
 
typedef vecN< int64_t, 4 > i64vec4
 
typedef vecN< int8_t, 1 > i8vec1
 
typedef vecN< int8_t, 2 > i8vec2
 
typedef vecN< int8_t, 3 > i8vec3
 
typedef vecN< int8_t, 4 > i8vec4
 
typedef vecN< int32_t, 1 > ivec1
 
typedef vecN< int32_t, 2 > ivec2
 
typedef vecN< int32_t, 3 > ivec3
 
typedef vecN< int32_t, 4 > ivec4
 
typedef uint32_t PainterIndex
 Typedef for the index type used by Painter.
 
typedef RectT< float > Rect
 
typedef vecN< uint16_t, 1 > u16vec1
 
typedef vecN< uint16_t, 2 > u16vec2
 
typedef vecN< uint16_t, 3 > u16vec3
 
typedef vecN< uint16_t, 4 > u16vec4
 
typedef vecN< uint32_t, 1 > u32vec1
 
typedef vecN< uint32_t, 2 > u32vec2
 
typedef vecN< uint32_t, 3 > u32vec3
 
typedef vecN< uint32_t, 4 > u32vec4
 
typedef vecN< uint64_t, 1 > u64vec1
 
typedef vecN< uint64_t, 2 > u64vec2
 
typedef vecN< uint64_t, 3 > u64vec3
 
typedef vecN< uint64_t, 4 > u64vec4
 
typedef vecN< uint8_t, 1 > u8vec1
 
typedef vecN< uint8_t, 2 > u8vec2
 
typedef vecN< uint8_t, 3 > u8vec3
 
typedef vecN< uint8_t, 4 > u8vec4
 
typedef vecN< uint32_t, 1 > uvec1
 
typedef vecN< uint32_t, 2 > uvec2
 
typedef vecN< uint32_t, 3 > uvec3
 
typedef vecN< uint32_t, 4 > uvec4
 
typedef vecN< float, 1 > vec1
 
typedef vecN< float, 2 > vec2
 
typedef vecN< float, 3 > vec3
 
typedef vecN< float, 4 > vec4
 

Enumerations

enum  glyph_type {
  coverage_glyph, distance_field_glyph, restricted_rays_glyph, banded_rays_glyph,
  invalid_glyph = 0x1000, adaptive_rendering = invalid_glyph
}
 Provides an enumeration of the rendering data for a glyph. More...
 
enum  return_code { routine_fail, routine_success }
 Enumeration for simple return codes for functions for success or failure. More...
 

Functions

uint32_t apply_bit_flag (uint32_t input_value, bool to_apply, uint32_t bitfield_value)
 
void assert_fail (const char *str, const char *file, int line)
 
void convert_to_fp16 (c_array< const float > src, c_array< uint16_t > dst)
 
void convert_to_fp32 (c_array< const uint16_t > src, c_array< float > dst)
 
template<typename T >
range_type< T > create_range (T a, T b)
 
template<typename T >
vecN< T, 3 > cross_product (const vecN< T, 3 > &a, const vecN< T, 3 > &b)
 
template<typename T , size_t N>
dot (const vecN< T, N > &a, const vecN< T, N > &b)
 
c_array< const uint8_t > fetch_static_resource (c_string resource_label)
 
void generate_static_resource (c_string resource_label, c_array< const uint8_t > value)
 
void generate_static_resource (c_string resource_label, c_string value)
 
bool is_power_of_2 (uint32_t v)
 
float local_distance_from_pixel_distance (float distance, const vec2 &resolution, const float3x3 &transformation_matrix, const vec2 &point, const vec2 &direction)
 
template<typename T , size_t N>
magnitude (const vecN< T, N > &in)
 
template<typename T , size_t N>
bool magnitude_compare (const vecN< T, N > &a, const vecN< T, N > &b)
 
template<typename T , size_t N>
magnitudeSq (const vecN< T, N > &in)
 
uint32_t next_power_of_2 (uint32_t v)
 
uint32_t number_bits_required (uint32_t v)
 
template<typename T , typename S >
bool operator!= (T *lhs, const reference_counted_ptr< S > &rhs)
 
template<typename T , typename S >
bool operator== (T *lhs, const reference_counted_ptr< S > &rhs)
 
uint32_t pack_as_fp16 (vec2 src)
 
uint32_t pack_as_fp16 (float x, float y)
 
uint32_t pack_bits (uint32_t bit0, uint32_t num_bits, uint32_t value)
 
uint32_t pack_float (float f)
 
uvec4 pack_vec4 (float x, float y, float z, float w)
 
uvec4 pack_vec4 (const vec4 &v)
 
template<typename T >
void swap (reference_counted_ptr< T > &lhs, reference_counted_ptr< T > &rhs)
 
int t_abs (int x)
 
long t_abs (long x)
 
long long t_abs (long long x)
 
float t_abs (float x)
 
double t_abs (double x)
 
long double t_abs (long double x)
 
float t_acos (float x)
 
double t_acos (double x)
 
long double t_acos (long double x)
 
float t_asin (float x)
 
double t_asin (double x)
 
long double t_asin (long double x)
 
float t_atan (float x)
 
double t_atan (double x)
 
long double t_atan (long double x)
 
float t_atan2 (float y, float x)
 
double t_atan2 (double y, double x)
 
long double t_atan2 (long double y, long double x)
 
float t_cos (float x)
 
double t_cos (double x)
 
long double t_cos (long double x)
 
template<typename T >
const T & t_max (const T &a, const T &b)
 
template<typename T >
const T & t_min (const T &a, const T &b)
 
template<typename T >
t_sign (const T &a)
 
float t_sin (float x)
 
double t_sin (double x)
 
long double t_sin (long double x)
 
float t_sqrt (float x)
 
double t_sqrt (double x)
 
long double t_sqrt (long double x)
 
float t_tan (float x)
 
double t_tan (double x)
 
long double t_tan (long double x)
 
template<typename T , size_t N>
triangle_area (const vecN< T, N > &p0, const vecN< T, N > &p1, const vecN< T, N > &p2)
 
uint32_t uint32_log2 (uint32_t v)
 
uint64_t uint64_apply_bit_flag (uint64_t input_value, bool to_apply, uint64_t bitfield_value)
 
bool uint64_is_power_of_2 (uint64_t v)
 
uint64_t uint64_log2 (uint64_t v)
 
uint64_t uint64_next_power_of_2 (uint64_t v)
 
uint64_t uint64_number_bits_required (uint64_t v)
 
uint64_t uint64_pack_bits (uint64_t bit0, uint64_t num_bits, uint64_t value)
 
uint64_t uint64_unpack_bits (uint64_t bit0, uint64_t num_bits, uint64_t value)
 
uint32_t unpack_bits (uint32_t bit0, uint32_t num_bits, uint32_t value)
 
float unpack_float (uint32_t v)
 

Detailed Description

all classes and functions of FastUIDraw are in the namespace fastuidraw.

All functionality of FastUIDraw is in the namespace fastuidraw.

Enumeration Type Documentation

◆ return_code

Enumeration for simple return codes for functions for success or failure.

Enumerator
routine_fail 

Routine failed

routine_success 

Routine suceeded

Definition at line 142 of file util.hpp.

Function Documentation

◆ apply_bit_flag()

uint32_t fastuidraw::apply_bit_flag ( uint32_t  input_value,
bool  to_apply,
uint32_t  bitfield_value 
)
inline

Given if a bit should be up or down returns an input value with that bit made to be up or down.

Parameters
input_valuevalue to return with the named bit(s) changed
to_applyif true, return value has bits made up, otherwise has bits down
bitfield_valuebits to make up or down as according to to_apply

Definition at line 260 of file util.hpp.

◆ assert_fail()

void fastuidraw::assert_fail ( const char *  str,
const char *  file,
int  line 
)

Private function used by macro FASTUIDRAWassert, do NOT call.

◆ create_range()

template<typename T >
range_type<T> fastuidraw::create_range ( a,
b 
)

For type T's which support comparison swap, makes sure that the returned range_type has that range_type::m_begin < range_type::m_end

Definition at line 488 of file util.hpp.

◆ is_power_of_2()

bool fastuidraw::is_power_of_2 ( uint32_t  v)
inline

Returns true if a uint32_t is an exact non-zero power of 2.

Parameters
vuint32_t to query

Definition at line 190 of file util.hpp.

◆ next_power_of_2()

uint32_t fastuidraw::next_power_of_2 ( uint32_t  v)
inline

Given v > 0, compute N so that N is a power of 2 and so that N / 2 < v <= N. When v is 0, returns 0.

Definition at line 214 of file util.hpp.

◆ number_bits_required()

uint32_t fastuidraw::number_bits_required ( uint32_t  v)

Returns the number of bits required to hold a 32-bit unsigned integer value.

◆ pack_bits()

uint32_t fastuidraw::pack_bits ( uint32_t  bit0,
uint32_t  num_bits,
uint32_t  value 
)
inline

Pack the lowest N bits of a value at a bit.

Parameters
bit0bit location of return value at which to pack
num_bitsnumber of bits from value to pack
valuevalue to pack

Definition at line 294 of file util.hpp.

◆ pack_float()

uint32_t fastuidraw::pack_float ( float  f)
inline

Returns a float pack into a 32-bit unsigned integer.

Parameters
fvalue to pack

Definition at line 360 of file util.hpp.

◆ uint32_log2()

uint32_t fastuidraw::uint32_log2 ( uint32_t  v)

Returns the floor of the log2 of an unsinged integer, i.e. the value K so that 2^K <= x < 2^{K+1}

◆ uint64_apply_bit_flag()

uint64_t fastuidraw::uint64_apply_bit_flag ( uint64_t  input_value,
bool  to_apply,
uint64_t  bitfield_value 
)
inline

Given if a bit should be up or down returns an input value with that bit made to be up or down.

Parameters
input_valuevalue to return with the named bit(s) changed
to_applyif true, return value has bits made up, otherwise has bits down
bitfield_valuebits to make up or down as according to to_apply

Definition at line 278 of file util.hpp.

◆ uint64_is_power_of_2()

bool fastuidraw::uint64_is_power_of_2 ( uint64_t  v)
inline

Returns true if a uint64_t is an exact non-zero power of 2.

Parameters
vuint64_t to query

Definition at line 202 of file util.hpp.

◆ uint64_log2()

uint64_t fastuidraw::uint64_log2 ( uint64_t  v)

Returns the floor of the log2 of an unsinged integer, i.e. the value K so that 2^K <= x < 2^{K+1}

◆ uint64_next_power_of_2()

uint64_t fastuidraw::uint64_next_power_of_2 ( uint64_t  v)
inline

Given v > 0, compute N so that N is a power of 2 and so that N / 2 < v <= N. When v is 0, returns 0.

Definition at line 235 of file util.hpp.

◆ uint64_number_bits_required()

uint64_t fastuidraw::uint64_number_bits_required ( uint64_t  v)

Returns the number of bits required to hold a 32-bit unsigned integer value.

◆ uint64_pack_bits()

uint64_t fastuidraw::uint64_pack_bits ( uint64_t  bit0,
uint64_t  num_bits,
uint64_t  value 
)
inline

Pack the lowest N bits of a value at a bit.

Parameters
bit0bit location of return value at which to pack
num_bitsnumber of bits from value to pack
valuevalue to pack

Definition at line 311 of file util.hpp.

◆ uint64_unpack_bits()

uint64_t fastuidraw::uint64_unpack_bits ( uint64_t  bit0,
uint64_t  num_bits,
uint64_t  value 
)
inline

Unpack N bits from a bit location.

Parameters
bit0starting bit from which to unpack
num_bitsnumber bits to unpack
valuevalue from which to unpack

Definition at line 345 of file util.hpp.

◆ unpack_bits()

uint32_t fastuidraw::unpack_bits ( uint32_t  bit0,
uint32_t  num_bits,
uint32_t  value 
)
inline

Unpack N bits from a bit location.

Parameters
bit0starting bit from which to unpack
num_bitsnumber bits to unpack
valuevalue from which to unpack

Definition at line 328 of file util.hpp.

◆ unpack_float()

float fastuidraw::unpack_float ( uint32_t  v)
inline

Unpack a float from a 32-bit unsigned integer.

Parameters
vvalue from which to unpack

Definition at line 376 of file util.hpp.