Loading [MathJax]/extensions/tex2jax.js
Tatooine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages Concepts
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
tatooine::gl::buffer_map< ArrayType, T, Access > Class Template Reference

#include <buffer.h>

Collaboration diagram for tatooine::gl::buffer_map< ArrayType, T, Access >:
[legend]

Public Types

using value_type = T
 
using buffer_type = buffer< array_type, T >
 

Public Member Functions

 buffer_map (buffer_type const *buffer, GLsizei offset, GLsizei length)
 constructor gets a mapping to gpu_buffer More...
 
 buffer_map (buffer_map const &)=delete
 
 buffer_map (buffer_map &&)=delete
 
auto operator= (buffer_map const &) -> buffer_map &=delete
 
auto operator= (buffer_map &&) -> buffer_map &=delete
 
auto operator= (std::vector< T > const &data) -> buffer_map &
 
 ~buffer_map ()
 destructor unmaps the buffer More...
 
auto unmap ()
 
auto at (std::size_t i) -> auto &
 
auto at (std::size_t i) const -> auto const &
 
auto front () -> auto &
 
auto front () const -> auto const &
 
auto back () -> auto &
 
auto back () const -> auto const &
 
auto operator[] (std::size_t i) -> auto &
 
auto operator[] (std::size_t i) const -> auto const &
 
auto begin ()
 
auto begin () const
 
auto end ()
 
auto end () const
 
auto offset () const
 
auto length () const
 

Static Public Attributes

static constexpr auto access = Access
 
static constexpr auto array_type = ArrayType
 
static constexpr auto data_size = buffer_type::data_size
 

Private Attributes

buffer_type const * m_buffer
 
GLsizei m_offset
 
GLsizei m_length
 
T * m_gpu_mapping
 
bool m_unmapped = false
 

Member Typedef Documentation

◆ buffer_type

template<GLsizei ArrayType, typename T , GLbitfield Access>
using tatooine::gl::buffer_map< ArrayType, T, Access >::buffer_type = buffer<array_type, T>

◆ value_type

template<GLsizei ArrayType, typename T , GLbitfield Access>
using tatooine::gl::buffer_map< ArrayType, T, Access >::value_type = T

Constructor & Destructor Documentation

◆ buffer_map() [1/3]

template<GLsizei ArrayType, typename T , GLbitfield Access>
tatooine::gl::buffer_map< ArrayType, T, Access >::buffer_map ( buffer_type const *  buffer,
GLsizei  offset,
GLsizei  length 
)
inline

constructor gets a mapping to gpu_buffer

◆ buffer_map() [2/3]

template<GLsizei ArrayType, typename T , GLbitfield Access>
tatooine::gl::buffer_map< ArrayType, T, Access >::buffer_map ( buffer_map< ArrayType, T, Access > const &  )
delete

◆ buffer_map() [3/3]

template<GLsizei ArrayType, typename T , GLbitfield Access>
tatooine::gl::buffer_map< ArrayType, T, Access >::buffer_map ( buffer_map< ArrayType, T, Access > &&  )
delete

◆ ~buffer_map()

template<GLsizei ArrayType, typename T , GLbitfield Access>
tatooine::gl::buffer_map< ArrayType, T, Access >::~buffer_map ( )
inline

destructor unmaps the buffer

Member Function Documentation

◆ at() [1/2]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::at ( std::size_t  i) -> auto&
inline

◆ at() [2/2]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::at ( std::size_t  i) const -> auto const&
inline

◆ back() [1/2]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::back ( ) -> auto&
inline

◆ back() [2/2]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::back ( ) const -> auto const&
inline

◆ begin() [1/2]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::begin ( )
inline

◆ begin() [2/2]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::begin ( ) const
inline

◆ end() [1/2]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::end ( )
inline

◆ end() [2/2]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::end ( ) const
inline

◆ front() [1/2]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::front ( ) -> auto&
inline

◆ front() [2/2]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::front ( ) const -> auto const&
inline

◆ length()

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::length ( ) const
inline

◆ offset()

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::offset ( ) const
inline

◆ operator=() [1/3]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::operator= ( buffer_map< ArrayType, T, Access > &&  ) -> buffer_map &=delete
delete

◆ operator=() [2/3]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::operator= ( buffer_map< ArrayType, T, Access > const &  ) -> buffer_map &=delete
delete

◆ operator=() [3/3]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::operator= ( std::vector< T > const &  data) -> buffer_map&
inline

◆ operator[]() [1/2]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::operator[] ( std::size_t  i) -> auto&
inline

◆ operator[]() [2/2]

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::operator[] ( std::size_t  i) const -> auto const&
inline

◆ unmap()

template<GLsizei ArrayType, typename T , GLbitfield Access>
auto tatooine::gl::buffer_map< ArrayType, T, Access >::unmap ( )
inline

Member Data Documentation

◆ access

template<GLsizei ArrayType, typename T , GLbitfield Access>
constexpr auto tatooine::gl::buffer_map< ArrayType, T, Access >::access = Access
staticconstexpr

◆ array_type

template<GLsizei ArrayType, typename T , GLbitfield Access>
constexpr auto tatooine::gl::buffer_map< ArrayType, T, Access >::array_type = ArrayType
staticconstexpr

◆ data_size

template<GLsizei ArrayType, typename T , GLbitfield Access>
constexpr auto tatooine::gl::buffer_map< ArrayType, T, Access >::data_size = buffer_type::data_size
staticconstexpr

◆ m_buffer

template<GLsizei ArrayType, typename T , GLbitfield Access>
buffer_type const* tatooine::gl::buffer_map< ArrayType, T, Access >::m_buffer
private

◆ m_gpu_mapping

template<GLsizei ArrayType, typename T , GLbitfield Access>
T* tatooine::gl::buffer_map< ArrayType, T, Access >::m_gpu_mapping
private

◆ m_length

template<GLsizei ArrayType, typename T , GLbitfield Access>
GLsizei tatooine::gl::buffer_map< ArrayType, T, Access >::m_length
private

◆ m_offset

template<GLsizei ArrayType, typename T , GLbitfield Access>
GLsizei tatooine::gl::buffer_map< ArrayType, T, Access >::m_offset
private

◆ m_unmapped

template<GLsizei ArrayType, typename T , GLbitfield Access>
bool tatooine::gl::buffer_map< ArrayType, T, Access >::m_unmapped = false
private

The documentation for this class was generated from the following file: