Blender V5.0
blender::draw::detail::DataBuffer< T, len, device_only > Class Template Reference

#include <DRW_gpu_wrapper.hh>

Public Member Functions

const Toperator[] (int64_t index) const
Toperator[] (int64_t index)
const Tdata () const
Tdata ()
const Tbegin () const
const Tend () const
Tbegin ()
Tend ()
 operator Span< T > () const

Protected Member Functions

 BLI_STATIC_ASSERT (((sizeof(T) *len) % 16)==0, "Buffer size need to be aligned to size of float4.")

Protected Attributes

Tdata_ = nullptr
int64_t len_ = len

Detailed Description

template<typename T, int64_t len, bool device_only>
class blender::draw::detail::DataBuffer< T, len, device_only >
Template Parameters
TType of the values stored in this uniform buffer.
lenThe number of values that can be stored in this uniform buffer.
device_onlyTrue if the buffer only resides on GPU memory and cannot be accessed.

Definition at line 92 of file DRW_gpu_wrapper.hh.

Member Function Documentation

◆ begin() [1/2]

template<typename T, int64_t len, bool device_only>
T * blender::draw::detail::DataBuffer< T, len, device_only >::begin ( )
inline

Definition at line 149 of file DRW_gpu_wrapper.hh.

References blender::draw::BLI_STATIC_ASSERT(), data_, and T.

◆ begin() [2/2]

template<typename T, int64_t len, bool device_only>
const T * blender::draw::detail::DataBuffer< T, len, device_only >::begin ( ) const
inline

Iterator

Definition at line 138 of file DRW_gpu_wrapper.hh.

References blender::draw::BLI_STATIC_ASSERT(), data_, and T.

◆ BLI_STATIC_ASSERT()

template<typename T, int64_t len, bool device_only>
blender::draw::detail::DataBuffer< T, len, device_only >::BLI_STATIC_ASSERT ( ((sizeof(T) *len) % 16) = =0,
"Buffer size need to be aligned to size of float4."  )
protected

References len, and T.

◆ data() [1/2]

template<typename T, int64_t len, bool device_only>
T * blender::draw::detail::DataBuffer< T, len, device_only >::data ( )
inline

Definition at line 129 of file DRW_gpu_wrapper.hh.

References blender::draw::BLI_STATIC_ASSERT(), data_, and T.

◆ data() [2/2]

template<typename T, int64_t len, bool device_only>
const T * blender::draw::detail::DataBuffer< T, len, device_only >::data ( ) const
inline

Get a pointer to the beginning of the array.

Definition at line 124 of file DRW_gpu_wrapper.hh.

References blender::draw::BLI_STATIC_ASSERT(), data_, and T.

Referenced by blender::draw::test_eevee_surfel_list().

◆ end() [1/2]

template<typename T, int64_t len, bool device_only>
T * blender::draw::detail::DataBuffer< T, len, device_only >::end ( )
inline

Definition at line 154 of file DRW_gpu_wrapper.hh.

References blender::draw::BLI_STATIC_ASSERT(), data_, len_, and T.

◆ end() [2/2]

template<typename T, int64_t len, bool device_only>
const T * blender::draw::detail::DataBuffer< T, len, device_only >::end ( ) const
inline

Definition at line 143 of file DRW_gpu_wrapper.hh.

References blender::draw::BLI_STATIC_ASSERT(), data_, len_, and T.

◆ operator Span< T >()

template<typename T, int64_t len, bool device_only>
blender::draw::detail::DataBuffer< T, len, device_only >::operator Span< T > ( ) const
inline

Definition at line 160 of file DRW_gpu_wrapper.hh.

◆ operator[]() [1/2]

template<typename T, int64_t len, bool device_only>
T & blender::draw::detail::DataBuffer< T, len, device_only >::operator[] ( int64_t index)
inline

Definition at line 113 of file DRW_gpu_wrapper.hh.

References BLI_assert, blender::draw::BLI_STATIC_ASSERT(), data_, len_, and T.

◆ operator[]() [2/2]

template<typename T, int64_t len, bool device_only>
const T & blender::draw::detail::DataBuffer< T, len, device_only >::operator[] ( int64_t index) const
inline

Get the value at the given index. This invokes undefined behavior when the index is out of bounds.

Definition at line 105 of file DRW_gpu_wrapper.hh.

References BLI_assert, blender::draw::BLI_STATIC_ASSERT(), data_, len_, and T.

Member Data Documentation

◆ data_

template<typename T, int64_t len, bool device_only>
T* blender::draw::detail::DataBuffer< T, len, device_only >::data_ = nullptr
protected

◆ len_

template<typename T, int64_t len, bool device_only>
int64_t blender::draw::detail::DataBuffer< T, len, device_only >::len_ = len
protected

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