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...
#include <painter_backend.hpp>
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.
A Painter will use a Painter Backend as follows within a Painter::begin() and Painter::end() pair.
for (how many surfaces S needed to draw all)
{
std::vector<fastuidraw::reference_counted_ptr<fastuidraw::PainterDraw> > draws;
for (how many PainterDraw objects needed to draw what is drawn in S)
{
p.
get()->
unmap(attributes_written, indices_written, data_store_written);
draws.push_back(p);
}
backend.
on_pre_draw(S, maybe_clear_color_buffer, maybe_begin_new_target);
for (p in draws)
{
}
draws.clear();
}
Definition at line 74 of file painter_backend.hpp.
◆ attribs_per_mapping()
virtual unsigned int fastuidraw::PainterBackend::attribs_per_mapping |
( |
void |
| ) |
const |
|
pure virtual |
To be implemented by a derived class to return the number of attributes a PainterDraw returned by map_draw() is guaranteed to hold.
◆ bind_coverage_surface()
Called to return an action to bind a PainterSurface to be used as the read from the deferred coverage buffer.
- Parameters
-
cvg_surface | coverage surface backing the deferred coverage buffer from which to read |
◆ bind_image()
Called to return an action to bind an Image whose backing store requires API binding.
- Parameters
-
◆ indices_per_mapping()
virtual unsigned int fastuidraw::PainterBackend::indices_per_mapping |
( |
void |
| ) |
const |
|
pure virtual |
To be implemented by a derived class to return the number of indices a PainterDraw returned by map_draw() is guaranteed to hold.
◆ map_draw()
To be implemented by a derived class to return a PainterDraw for filling of data.
◆ on_painter_begin()
virtual void fastuidraw::PainterBackend::on_painter_begin |
( |
void |
| ) |
|
|
pure virtual |
◆ on_post_draw()
virtual void fastuidraw::PainterBackend::on_post_draw |
( |
void |
| ) |
|
|
pure virtual |
◆ on_pre_draw()
Called just before calling PainterDraw::draw() on a sequence of PainterDraw objects who have had their PainterDraw::unmap() routine called. An implementation will will clear the depth (aka occlusion) buffer and optionally the color buffer in the viewport of the PainterSurface.
- Parameters
-
surface | the PainterSurface to which to render content |
clear_color_buffer | if true, clear the color buffer on the viewport of the surface. |
begin_new_target | if true indicates that drawing is to start on the surface (typically this means that when this is true that the backend will clear all auxiliary buffers (such as the depth buffer). |
The documentation for this class was generated from the following file: