Store for attributes, indices of items and shared data of items for items to draw. Indices (stored in m_indices) are -ALWAYS- in groups of three where each group is a single triangle and each index is an index into m_attributes. The PainterDraw object is NOT thread safe, neither is its reference count. A PainterDraw object is used Painter to send attributer and index data to a Painter Backend.
More...
#include <painter_draw.hpp>
|
virtual void | unmap_implement (unsigned int attributes_written, unsigned int indices_written, unsigned int data_store_written)=0 |
|
Store for attributes, indices of items and shared data of items for items to draw. Indices (stored in m_indices) are -ALWAYS- in groups of three where each group is a single triangle and each index is an index into m_attributes. The PainterDraw object is NOT thread safe, neither is its reference count. A PainterDraw object is used Painter to send attributer and index data to a Painter Backend.
Definition at line 49 of file painter_draw.hpp.
◆ PainterDraw()
fastuidraw::PainterDraw::PainterDraw |
( |
void |
| ) |
|
◆ add_action()
Adds a delayed action to the action list.
- Parameters
-
h | handle to action to add. |
◆ draw()
virtual void fastuidraw::PainterDraw::draw |
( |
void |
| ) |
const |
|
pure virtual |
◆ draw_break() [1/2]
Called to indicate a change in value to the painter header that this PainterDraw needs to record. The most common case is to insert API state changes (or just break a draw) for when a Painter Backend cannot accomodate a Painter state change without changing the 3D API state.
- Parameters
-
render_type | the render target type of the rendering |
old_groups | PainterShaderGroup before state change |
new_groups | PainterShaderGroup after state change |
indices_written | total number of indices written to m_indices -before- the change |
- Returns
- true if the PainterShaderGroup resulted in a draw break
◆ draw_break() [2/2]
Called to execute an action (and thus also cause a draw-call break). Implementations are to assume that PainterDrawBreakAction reference is non-null. Implementations are to return true if the draw_break triggers a break in the draw call.
- Parameters
-
action | action to execute |
indices_written | total number of indices written to m_indices -before- the break |
◆ unmap()
void fastuidraw::PainterDraw::unmap |
( |
unsigned int |
attributes_written, |
|
|
unsigned int |
indices_written, |
|
|
unsigned int |
data_store_written |
|
) |
| |
Signals this PainterDraw to be unmapped. Actual unmapping is delayed until all actions that have been added with add_action() have been called.
- Parameters
-
◆ unmap_implement()
virtual void fastuidraw::PainterDraw::unmap_implement |
( |
unsigned int |
attributes_written, |
|
|
unsigned int |
indices_written, |
|
|
unsigned int |
data_store_written |
|
) |
| |
|
protectedpure virtual |
To be implemented by a derived class to unmap the arrays m_store, m_attributes and m_indices. Once unmapped, the store can no longer be written to.
- Parameters
-
attributes_written | only the range [0,floats_written) of m_attributes must be uploaded to 3D API |
indices_written | only the range [0,uints_written) of m_indices specify indices to use. |
data_store_written | only the range [0,data_store_written) of m_store must be uploaded to 3D API |
◆ unmapped()
bool fastuidraw::PainterDraw::unmapped |
( |
void |
| ) |
const |
Returns true if and only if this PainterDraw is unmapped.
◆ m_attributes
Location to which to place attribute data, the store is understood to be write only.
Definition at line 101 of file painter_draw.hpp.
◆ m_header_attributes
c_array<uint32_t> fastuidraw::PainterDraw::m_header_attributes |
◆ m_indices
Location to which to place index data. Values are indices into m_attributes, the store is understood to be write only.
Definition at line 117 of file painter_draw.hpp.
◆ m_store
Generic store for data that is shared between vertices within an item and possibly between items. The store is understood to be write only.
Definition at line 125 of file painter_draw.hpp.
The documentation for this class was generated from the following file:
- /home/kevin/fastuidraw.krogueintel/inc/fastuidraw/painter/backend/painter_draw.hpp