Tatooine
|
buffer base class for each of the OpenGL buffer types More...
#include <buffer.h>
Public Types | |
using | parent_type = id_holder< GLuint > |
using | this_type = buffer< array_type, T > |
using | value_type = T |
using | read_only_element_type = rbuffer_map_element< array_type, T > |
using | read_write_element_type = rwbuffer_map_element< array_type, T > |
using | write_only_element_type = wbuffer_map_element< array_type, T > |
using | iterator = buffer_iterator< array_type, T > |
using | const_iterator = cbuffer_iterator< array_type, T > |
using | read_map_type = rbuffer_map< array_type, T > |
using | write_map_type = wbuffer_map< array_type, T > |
using | read_write_map_type = rwbuffer_map< array_type, T > |
Public Member Functions | |
buffer (buffer_usage usage) | |
buffer (const buffer &other) | |
buffer (buffer &&other) noexcept | |
auto | operator= (const buffer &other) -> buffer & |
auto | operator= (buffer &&other) noexcept -> buffer & |
auto | operator= (const std::vector< T > &data) -> buffer & |
buffer (GLsizei n, buffer_usage usage) | |
buffer (GLsizei n, const T &initial, buffer_usage usage) | |
buffer (const std::vector< T > &data, buffer_usage usage) | |
~buffer () | |
auto | create_handle () -> void |
auto | destroy_handle () -> void |
auto | upload_data (const T &data) -> void |
auto | upload_data (const std::vector< T > &data) -> void |
auto | download_data () const -> std::vector< T > |
auto | bind () const -> void |
auto | copy (const this_type &other) -> void |
auto | empty () const -> bool |
auto | size () const |
auto | capacity () const |
auto | reserve (GLsizei size) -> void |
auto | resize (GLsizei size) -> void |
auto | clear () |
auto | gpu_malloc (GLsizei n) -> void |
auto | gpu_malloc (GLsizei n, const T &initial) -> void |
auto | set_usage (buffer_usage) -> void |
auto | push_back (T const &) -> void |
auto | pop_back () -> void |
template<typename... Ts> | |
auto | emplace_back (Ts &&...) -> void |
auto | read_write_element_at (std::size_t idx) |
auto | read_element_at (std::size_t idx) const |
auto | write_only_element_at (std::size_t idx) |
auto | at (std::size_t idx) |
auto | at (std::size_t idx) const |
auto | operator[] (std::size_t idx) |
auto | operator[] (std::size_t idx) const |
auto | front () |
auto | front () const |
auto | back () |
auto | back () const |
auto | begin () |
auto | end () |
auto | begin () const |
auto | end () const |
auto | rmap () const |
auto | wmap () |
auto | rwmap () |
auto | map () |
auto | map () const |
auto | map (std::size_t offset, std::size_t length) |
auto | map (std::size_t offset, std::size_t length) const |
template<typename... Ts> | |
auto | emplace_back (Ts &&... ts) -> void |
![]() | |
id_holder () | |
id_holder (GLuint _id) | |
id_holder (id_holder const &other)=delete | |
id_holder (id_holder &&other) noexcept | |
auto | operator= (id_holder const &other) -> id_holder &=delete |
auto | operator= (id_holder &&other) noexcept -> id_holder & |
~id_holder ()=default | |
auto | id () const |
void | swap (id_holder &other) |
Static Public Member Functions | |
static auto | unbind () -> void |
Static Public Attributes | |
static constexpr auto | array_type = ArrayType |
static constexpr GLsizei | data_size = static_cast<GLsizei>(sizeof(T)) |
![]() | |
static constexpr auto | default_val |
Private Attributes | |
GLsizei | m_size = 0 |
GLsizei | m_capacity = 0 |
buffer_usage | m_usage |
Friends | |
class | rbuffer_map_element< ArrayType, T > |
class | rwbuffer_map_element< ArrayType, T > |
Additional Inherited Members | |
![]() | |
void | set_id (GLuint id) |
auto | id_ptr () |
auto | id_ref () -> auto & |
buffer base class for each of the OpenGL buffer types
using tatooine::gl::buffer< ArrayType, T >::const_iterator = cbuffer_iterator<array_type, T> |
using tatooine::gl::buffer< ArrayType, T >::iterator = buffer_iterator<array_type, T> |
using tatooine::gl::buffer< ArrayType, T >::parent_type = id_holder<GLuint> |
using tatooine::gl::buffer< ArrayType, T >::read_map_type = rbuffer_map<array_type, T> |
using tatooine::gl::buffer< ArrayType, T >::read_only_element_type = rbuffer_map_element<array_type, T> |
using tatooine::gl::buffer< ArrayType, T >::read_write_element_type = rwbuffer_map_element<array_type, T> |
using tatooine::gl::buffer< ArrayType, T >::read_write_map_type = rwbuffer_map<array_type, T> |
using tatooine::gl::buffer< ArrayType, T >::this_type = buffer<array_type, T> |
using tatooine::gl::buffer< ArrayType, T >::value_type = T |
using tatooine::gl::buffer< ArrayType, T >::write_map_type = wbuffer_map<array_type, T> |
using tatooine::gl::buffer< ArrayType, T >::write_only_element_type = wbuffer_map_element<array_type, T> |
|
explicit |
tatooine::gl::buffer< array_type, T >::buffer | ( | const buffer< ArrayType, T > & | other | ) |
|
noexcept |
tatooine::gl::buffer< array_type, T >::buffer | ( | GLsizei | n, |
buffer_usage | usage | ||
) |
tatooine::gl::buffer< array_type, T >::buffer | ( | GLsizei | n, |
const T & | initial, | ||
buffer_usage | usage | ||
) |
tatooine::gl::buffer< array_type, T >::buffer | ( | const std::vector< T > & | data, |
buffer_usage | usage | ||
) |
tatooine::gl::buffer< array_type, T >::~buffer |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
auto tatooine::gl::buffer< array_type, T >::bind |
|
inline |
|
inline |
auto tatooine::gl::buffer< array_type, T >::copy | ( | const this_type & | other | ) | -> void |
auto tatooine::gl::buffer< array_type, T >::create_handle |
auto tatooine::gl::buffer< array_type, T >::destroy_handle |
auto tatooine::gl::buffer< array_type, T >::download_data |
auto tatooine::gl::buffer< ArrayType, T >::emplace_back | ( | Ts &&... | ts | ) | -> void |
auto tatooine::gl::buffer< ArrayType, T >::emplace_back | ( | Ts && | ... | ) | -> void |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
auto tatooine::gl::buffer< array_type, T >::gpu_malloc | ( | GLsizei | n | ) | -> void |
auto tatooine::gl::buffer< array_type, T >::gpu_malloc | ( | GLsizei | n, |
const T & | initial | ||
) | -> void |
|
inline |
|
inline |
|
inline |
|
inline |
|
noexcept |
auto tatooine::gl::buffer< array_type, T >::operator= | ( | const buffer< ArrayType, T > & | other | ) | -> buffer& |
auto tatooine::gl::buffer< array_type, T >::operator= | ( | const std::vector< T > & | data | ) | -> buffer& |
|
inline |
|
inline |
auto tatooine::gl::buffer< array_type, T >::pop_back |
auto tatooine::gl::buffer< array_type, T >::push_back | ( | T const & | t | ) | -> void |
|
inline |
|
inline |
auto tatooine::gl::buffer< array_type, T >::reserve | ( | GLsizei | size | ) | -> void |
auto tatooine::gl::buffer< array_type, T >::resize | ( | GLsizei | size | ) | -> void |
|
inline |
|
inline |
auto tatooine::gl::buffer< array_type, T >::set_usage | ( | buffer_usage | u | ) | -> void |
|
inline |
|
static |
auto tatooine::gl::buffer< array_type, T >::upload_data | ( | const std::vector< T > & | data | ) | -> void |
auto tatooine::gl::buffer< array_type, T >::upload_data | ( | const T & | data | ) | -> void |
|
inline |
|
inline |
|
friend |
|
friend |
|
staticconstexpr |
|
staticconstexpr |
|
private |
|
private |
|
private |