FastUIDraw
Public Member Functions | List of all members
fastuidraw::PainterBrushShaderData Class Referenceabstract

Base class to hold custom data for custom brush shaders. More...

#include <painter_brush_shader_data.hpp>

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

Public Member Functions

virtual c_array< const reference_counted_ptr< const Image > > bind_images (void) const
 
virtual unsigned int data_size (void) const =0
 
virtual unsigned int number_resources (void) const
 
virtual void pack_data (c_array< uvec4 > dst) const =0
 
virtual void save_resources (c_array< reference_counted_ptr< const resource_base > > dst) const
 

Detailed Description

Base class to hold custom data for custom brush shaders.

Definition at line 37 of file painter_brush_shader_data.hpp.

Member Function Documentation

◆ bind_images()

virtual c_array<const reference_counted_ptr<const Image> > fastuidraw::PainterBrushShaderData::bind_images ( void  ) const
inlinevirtual

To be implemented by a derived class to return a c_array of references to Image objects whose Image::type() value is Image::context_texture2d. The i'th entry in the returned array will be bound to the i'th external texture slot of the backend via the PainterDrawBreakAction objected returned by PainterBackend::bind_image(). Default implementation is to return an empty array.

Reimplemented in fastuidraw::PainterBrush, fastuidraw::PainterGradientBrushShaderData, and fastuidraw::PainterImageBrushShaderData.

Definition at line 99 of file painter_brush_shader_data.hpp.

◆ data_size()

virtual unsigned int fastuidraw::PainterBrushShaderData::data_size ( void  ) const
pure virtual

To be implemented by a derived class to return the number of uvec4 blocks needed to pack the data.

Implemented in fastuidraw::PainterBrush, fastuidraw::PainterGradientBrushShaderData, and fastuidraw::PainterImageBrushShaderData.

◆ number_resources()

virtual unsigned int fastuidraw::PainterBrushShaderData::number_resources ( void  ) const
inlinevirtual

To be optionally implemented by a derived class to return the number of resources that need to be resident after packing. Default implementation returns 0.

Reimplemented in fastuidraw::PainterBrush, fastuidraw::PainterGradientBrushShaderData, and fastuidraw::PainterImageBrushShaderData.

Definition at line 82 of file painter_brush_shader_data.hpp.

◆ pack_data()

virtual void fastuidraw::PainterBrushShaderData::pack_data ( c_array< uvec4 dst) const
pure virtual

To be implemented by a derived class to pack the data.

Parameters
dstlocation to which to pack the data

Implemented in fastuidraw::PainterBrush, fastuidraw::PainterGradientBrushShaderData, and fastuidraw::PainterImageBrushShaderData.

◆ save_resources()

virtual void fastuidraw::PainterBrushShaderData::save_resources ( c_array< reference_counted_ptr< const resource_base > >  dst) const
inlinevirtual

To be optionally implemented by a derived class to save references to resources that need to be resident after packing. Default implementation does nothing.

Parameters
dstlocation to which to save resources.

Reimplemented in fastuidraw::PainterBrush, fastuidraw::PainterGradientBrushShaderData, and fastuidraw::PainterImageBrushShaderData.

Definition at line 70 of file painter_brush_shader_data.hpp.


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