FastUIDraw
|
A PainterEngine provides an interface to create Painter Backend derived objects. More...
#include <painter_engine.hpp>
Classes | |
class | ConfigurationBase |
A ConfigurationBase holds properties common to all Painter Backend objects returned by PainterEngine::create_backend() from a fixed PainterEngine. More... | |
class | PerformanceHints |
PerformanceHints provides miscellaneous data about Painter Backend objects returned by PainterEngine::create_backend() from a fixed PainterEngine. More... | |
Public Member Functions | |
ColorStopAtlas & | colorstop_atlas (void) const |
const ConfigurationBase & | configuration_base (void) const |
virtual reference_counted_ptr< PainterBackend > | create_backend (void) const =0 |
virtual reference_counted_ptr< PainterSurface > | create_surface (ivec2 dims, enum PainterSurface::render_type_t render_type)=0 |
const PainterShaderSet & | default_shaders (void) const |
GlyphAtlas & | glyph_atlas (void) const |
GlyphCache & | glyph_cache (void) const |
const PerformanceHints & | hints (void) const |
ImageAtlas & | image_atlas (void) const |
PainterShaderRegistrar & | painter_shader_registrar (void) const |
template<typename T > | |
void | register_shader (const T &v) |
Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter > | |
reference_counted_base (void) | |
Protected Member Functions | |
PainterEngine (reference_counted_ptr< GlyphAtlas > glyph_atlas, reference_counted_ptr< ImageAtlas > image_atlas, reference_counted_ptr< ColorStopAtlas > colorstop_atlas, reference_counted_ptr< PainterShaderRegistrar > shader_registrar, const ConfigurationBase &config, const PainterShaderSet &pdefault_shaders) | |
PerformanceHints & | set_hints (void) |
Additional Inherited Members | |
Static Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter > | |
static void | add_reference (const reference_counted_base< T, Counter > *p) |
static void | remove_reference (const reference_counted_base< T, Counter > *p) |
A PainterEngine provides an interface to create Painter Backend derived objects.
Definition at line 42 of file painter_engine.hpp.
|
protected |
Ctor.
glyph_atlas | GlyphAtlas for glyphs drawn by each Painter Backend returned by create_backend() of the created PainterEngine |
image_atlas | ImageAtlas for images drawn by each Painter Backend returned by create_backend() of the created PainterEngine |
colorstop_atlas | ColorStopAtlas for color stop sequences drawn by each Painter Backend returned by create_backend() of the created PainterEngine |
shader_registrar | PainterShaderRegistrar used by each Painter Backend returned by create_backend() of the created PainterEngine |
config | ConfigurationBase for each Painter Backend returned by create_backend() of the created PainterEngine |
pdefault_shaders | default shaders for each Painter Backend returned by create_backend() of the created PainterEngine; shaders are registered at construction of the created PainterEngine |
ColorStopAtlas& fastuidraw::PainterEngine::colorstop_atlas | ( | void | ) | const |
Returns a reference to the ColorStopAtlas of this PainterEngine. All color stops used by all brushes of each Painter Backend made from this PainterEngine must live on colorstop_atlas().
const ConfigurationBase& fastuidraw::PainterEngine::configuration_base | ( | void | ) | const |
Returns the ConfigurationBase passed in the ctor.
|
pure virtual |
To be implemented by a derived class to create a Painter Backend object. All Painter Backend objects created by create_backend() from the same PainterEngine share the same
Implemented in fastuidraw::gl::PainterEngineGL.
|
pure virtual |
To be implemented by a derived class to create a Surface with its own backing that is useable by any Painter Backend object that this PainterEngine returns in create_backend()
dims | the dimensions of the backing store of the returned Surface |
render_type | the render type of the surface (i.e. is it a color buffer or deferred coverage buffer). |
Implemented in fastuidraw::gl::PainterEngineGL.
const PainterShaderSet& fastuidraw::PainterEngine::default_shaders | ( | void | ) | const |
Returns the PainterShaderSet for the backend. Returned values will already be registered to the PainterShaderRegistrar returned by painter_shader_registrar().
GlyphAtlas& fastuidraw::PainterEngine::glyph_atlas | ( | void | ) | const |
Returns a reference to the GlyphAtlas of this PainterEngine. All glyphs used by each Painter made from this PainterEngine must live on glyph_atlas().
GlyphCache& fastuidraw::PainterEngine::glyph_cache | ( | void | ) | const |
Returns a handle to the GlyphCache made from glyph_atlas().
const PerformanceHints& fastuidraw::PainterEngine::hints | ( | void | ) | const |
Returns the PerformanceHints for the PainterBackend, may only be called after on_begin() has been called atleast once. The value returned is expected to stay constant once on_begin() has been called.
ImageAtlas& fastuidraw::PainterEngine::image_atlas | ( | void | ) | const |
Returns a reference to the ImageAtlas of this PainterEngine. All images used by each Painter Backend made from this PainterEngine must live on image_atlas().
PainterShaderRegistrar& fastuidraw::PainterEngine::painter_shader_registrar | ( | void | ) | const |
Returns the PainterShaderRegistrar of this PainterEngine. Use this return value to add custom shaders. NOTE: shaders added within a thread are not useable by a Painter Backend made from this PainterEngine within that thread until the next call to its PainterBackend::begin().
|
inline |
Provided as a conveniance, equivalent to
v | shade value to register to painter_shader_registrar() |
Definition at line 255 of file painter_engine.hpp.
|
protected |
To be accessed by a derived class in its ctor to set the performance hint values for itself.