FastUIDraw
|
Base class to hold custom data for custom brush shaders. More...
#include <painter_brush_shader_data.hpp>
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 |
Base class to hold custom data for custom brush shaders.
Definition at line 37 of file painter_brush_shader_data.hpp.
|
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.
|
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.
|
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.
|
pure virtual |
To be implemented by a derived class to pack the data.
dst | location to which to pack the data |
Implemented in fastuidraw::PainterBrush, fastuidraw::PainterGradientBrushShaderData, and fastuidraw::PainterImageBrushShaderData.
|
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.
dst | location 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.