FastUIDraw
|
Provides an interface to write attribute and index data when a simple copy of data from c_array objects is not sufficient. More...
#include <painter_attribute_writer.hpp>
Classes | |
class | WriteState |
Public Member Functions | |
virtual bool | initialize_state (WriteState *state) const =0 |
virtual void | on_new_store (WriteState *state) const =0 |
virtual bool | requires_coverage_buffer (void) const =0 |
virtual unsigned int | state_length (void) const =0 |
virtual bool | write_data (c_array< PainterAttribute > dst_attribs, c_array< PainterIndex > dst_indices, unsigned int attrib_location, WriteState *state, unsigned int *num_attribs_written, unsigned int *num_indices_written) const =0 |
Provides an interface to write attribute and index data when a simple copy of data from c_array objects is not sufficient.
A PainterAttributeWriter is to be stateless. However, in order to be able to successfully write multiple chunks of attributes and indices, a PainterAttributeWriter is given a "cookie" (see WriteState) which represents how far along streaming it is.
Definition at line 47 of file painter_attribute_writer.hpp.
|
pure virtual |
To be implemented by a derived clas to initialize a PainterAttributeWriter::WriteState to indicate the start of writing data for a subsequence calls to write_data(). To return true if there is attribute and index data to upload.
state | PainterAttributeWriter::WriteState to initialize. |
Implemented in fastuidraw::StrokingAttributeWriter.
|
pure virtual |
To be implemented by a derived class. Called by the caller of a PainterAttributeWriter to indicate that a new data store has been started.
state | PainterAttributeWriter::WriteState to update |
Implemented in fastuidraw::StrokingAttributeWriter.
|
pure virtual |
To be implemented by a derived class to indicate if the attribute rendering requires a coverage buffer.
Implemented in fastuidraw::StrokingAttributeWriter.
|
pure virtual |
To be implemented by a derived class to return how large the array PainterAttributeWriter::WriteState::m_state should be.
Implemented in fastuidraw::StrokingAttributeWriter.
|
pure virtual |
To be implemented by a derived class to write attribute and index data. Returns true if there is further attribute and index data to upload.
dst_attribs | location to which to write attributes. The size of the array is guaranteed by the caller to be atleast the value of WriteState::m_min_attributes_for_next. |
dst_indices | location to which to write indices. The size of the array is guaranteed by the caller to be atleast the value of WriteState::m_min_indices_for_next. |
attrib_location | index value of the attribute at dst_attribs[0]. |
state | the write state of the session which is to be updated for the next call to write_data(). |
num_attribs_written | location to which to write the number of attributes written by the call to write_data(). |
num_indices_written | location to which to write the number of indices written by the call to write_data(). |
Implemented in fastuidraw::StrokingAttributeWriter.