FastUIDraw
Public Member Functions | List of all members
fastuidraw::PainterItemShader Class Reference

A PainterItemShader represents a shader to draw an item (typically a vertex and fragment shader pair). More...

#include <painter_item_shader.hpp>

Inheritance diagram for fastuidraw::PainterItemShader:
Inheritance graph
[legend]

Public Member Functions

 PainterItemShader (const reference_counted_ptr< PainterItemCoverageShader > &cvg=reference_counted_ptr< PainterItemCoverageShader >())
 
 PainterItemShader (unsigned int num_sub_shaders, const reference_counted_ptr< PainterItemCoverageShader > &cvg=reference_counted_ptr< PainterItemCoverageShader >())
 
 PainterItemShader (reference_counted_ptr< PainterItemShader > parent, unsigned int sub_shader, const reference_counted_ptr< PainterItemCoverageShader > &cvg=reference_counted_ptr< PainterItemCoverageShader >())
 
const reference_counted_ptr< PainterItemCoverageShader > & coverage_shader (void) const
 
- Public Member Functions inherited from fastuidraw::PainterShader
 PainterShader (unsigned int num_sub_shaders=1)
 
 PainterShader (reference_counted_ptr< PainterShader > parent, unsigned int sub_shader)
 
uint32_t group (const PainterShaderRegistrar &) const
 
uint32_t ID (const PainterShaderRegistrar &) const
 
unsigned int number_sub_shaders (void) const
 
const reference_counted_ptr< PainterShader > & parent (void) const
 
bool registered_to (const PainterShaderRegistrar &) const
 
uint32_t sub_shader (void) const
 
Tag tag (const PainterShaderRegistrar &) const
 
- Public Member Functions inherited from fastuidraw::reference_counted_base< T, Counter >
 reference_counted_base (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)
 

Detailed Description

A PainterItemShader represents a shader to draw an item (typically a vertex and fragment shader pair).

Definition at line 38 of file painter_item_shader.hpp.

Constructor & Destructor Documentation

◆ PainterItemShader() [1/3]

fastuidraw::PainterItemShader::PainterItemShader ( const reference_counted_ptr< PainterItemCoverageShader > &  cvg = reference_counted_ptr<PainterItemCoverageShader>())
inlineexplicit

Ctor for a PainterItemShader with no sub-shaders.

Parameters
cvgcoverage shader for the PainterItemShader; the coverage shader, if present is to use the exact same PainterItemShaderData value but render to the coverage buffer. The PainterItemShader can then use those coverage values in its shader code.

Definition at line 51 of file painter_item_shader.hpp.

◆ PainterItemShader() [2/3]

fastuidraw::PainterItemShader::PainterItemShader ( unsigned int  num_sub_shaders,
const reference_counted_ptr< PainterItemCoverageShader > &  cvg = reference_counted_ptr<PainterItemCoverageShader>() 
)
inlineexplicit

Ctor for creating a PainterItemShader which has multiple sub-shaders. The purpose of sub-shaders is for the case where multiple shaders almost same code and those code differences can be realized by examining a sub-shader ID.

Parameters
num_sub_shadersnumber of sub-shaders
cvgcoverage shader for the PainterItemShader; the coverage shader, if present is to use the exact same PainterItemShaderData value but render to the coverage buffer. The PainterItemShader can then use those coverage values in its shader code.

Definition at line 72 of file painter_item_shader.hpp.

◆ PainterItemShader() [3/3]

fastuidraw::PainterItemShader::PainterItemShader ( reference_counted_ptr< PainterItemShader parent,
unsigned int  sub_shader,
const reference_counted_ptr< PainterItemCoverageShader > &  cvg = reference_counted_ptr<PainterItemCoverageShader>() 
)
inline

Ctor to create a PainterItemShader realized as a sub-shader of an existing PainterItemShader

Parameters
parentparent PainterItemShader that has sub-shaders
sub_shaderwhich sub-shader of the parent PainterItemShader
cvgcoverage shader for the PainterItemShader; the coverage shader, if present is to use the exact same PainterItemShaderData value but render to the coverage buffer. The PainterItemShader can then use those coverage values in its shader code.

Definition at line 91 of file painter_item_shader.hpp.

Member Function Documentation

◆ coverage_shader()

const reference_counted_ptr<PainterItemCoverageShader>& fastuidraw::PainterItemShader::coverage_shader ( void  ) const
inline

The coverage shader used by this PainterItemShader; the coverage shader, if present is to use the exact same PainterItemShaderData value but renders to the coverage buffer. The PainterItemShader can then use those coverage values in its shader code.

Definition at line 107 of file painter_item_shader.hpp.


The documentation for this class was generated from the following file: