|
| render_buffer (const std::string &description="[R,G,B,A]") |
| construct from description of component format, where the default format specifies a color buffer with alpha channel
|
|
void | destruct (const context &ctx) |
| destruct the render buffer
|
|
bool | create (const context &ctx, int width=-1, int height=-1) |
|
bool | is_created () const override |
| check whether the buffer has been created
|
|
| ~render_buffer () |
| calls the destruct method if necessary
|
|
int | get_width () const |
| return the width in pixels of the buffer
|
|
int | get_height () const |
| return the height in pixels of the buffer
|
|
bool | is_depth_buffer () const |
| return whether the component format corresponds to a depth buffer format
|
|
bool | is_color_buffer () const |
| return whether the component format corresponds to a color buffer format
|
|
void | put_id_void (void *ptr) const |
|
template<typename T > |
void | put_id (T &id) const |
| cast the refence to rendering api specific representation of component id to the specified type
|
|
bool | set_component_format (const std::string &description) |
| set the component format from a description string More...
|
|
void | set_component_format (ComponentFormat _cf) |
| set the component names from a standard component format More...
|
|
void | set_components (const std::string &_components) |
| comma separated list of component descriptors, for example "R,G,B"
|
|
void | set_integer_interpretation (ComponentIntegerInterpretation cii) |
| set the integer interpretation
|
|
ComponentIntegerInterpretation | get_integer_interpretation () const |
| return current integer interpretation
|
|
template<typename T > |
T | get (int ci, const void *ptr) const |
| constant access to the i-th component stored at the given location
|
|
template<typename T > |
bool | set (int ci, void *ptr, const T &v) const |
| write access to the i-th component, return whether write was successful
|
|
bool | empty () const |
| return whether the component format is defined
|
|
void | clear () |
| clear the component format
|
|
const packing_info & | get_packing_info () const |
| return the packing info by simple conversion of the this pointer
|
|
void | set_packing_info (const packing_info &pi) |
| set packing info by simply assigning to a converted this pointer
|
|
unsigned int | get_nr_components () const |
| return the number of components More...
|
|
unsigned int | get_component_index (const std::string &name) const |
| return the index of a component given by name or -1 if not found
|
|
std::string | get_component_name (unsigned int i) const |
| return the name of the component with index i
|
|
ComponentFormat | get_standard_component_format () const |
| return whether the component format is one of the standard formats
|
|
void | set_component_names (const std::string &_component_name_list) |
| set component names from a comma or colon separated list of names
|
|
TypeId | get_component_type () const |
| return the component type
|
|
void | set_component_type (TypeId _type_id) |
| set the component type
|
|
unsigned int | get_entry_size () const |
| return the size of one entry of components in bytes More...
|
|
bool | operator== (const component_format &cf) const |
| comparison between component formats
|
|
bool | operator== (const packing_info &pi) const |
| equal comparison
|
|
bool | operator!= (const component_format &cf) const |
| comparison between component formats
|
|
bool | operator!= (const packing_info &pi) const |
| unequal comparison
|
|
unsigned int | get_bit_depth (unsigned int ci) const |
| return the bit depth of the ci-th component
|
|
void | set_bit_depth (unsigned int ci, unsigned int depth) |
| set the bit depth of the ci-th component
|
|
bool | is_packing () const |
| return whether packing is enabled
|
|
void | set_packing (bool enable=true) |
| set the packing flag
|
|
unsigned int | get_component_alignment () const |
| return the component alignment in bits in the packed case and in bytes in the unpacked case
|
|
void | set_component_alignment (unsigned int a) |
| set the component alignment in bits in the packed case and in bytes in the unpacked case
|
|
int | get_signed (unsigned int ci, const void *ptr) const |
| return the ci-th component of the data entry pointed to by the given pointer of a signed packed component
|
|
unsigned int | get_unsigned (unsigned int ci, const void *ptr) const |
| return the ci-th component of the data entry pointed to by the given pointer of an unsigned packed component
|
|
bool | set_signed (unsigned int ci, void *ptr, int v) const |
| set the ci-th component of the data entry pointed to by the given pointer of a signed packed component
|
|
bool | set_unsigned (unsigned int ci, void *ptr, unsigned int v) const |
| set the ci-th component of the data entry pointed to by the given pointer of an unsigned packed component
|
|
this class encapsulate render buffers that live on the GPU which must support frame buffer objects for this to work.