MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ get_raw_data()

const void * MayaFlux::Kakshya::TextureContainer::get_raw_data ( ) const
overridevirtual

Get a raw pointer to the underlying data storage.

Returns
Pointer to raw data (type depends on DataVariant)

Implements MayaFlux::Kakshya::NDDataContainer< DataVariant >.

Definition at line 948 of file TextureContainer.cpp.

949{
950 if (m_data.empty()) {
951 return nullptr;
952 }
953
954 ensure_cpu(0);
955 auto [ptr, bytes] = variant_bytes(m_data[0]);
956 return (ptr && bytes > 0) ? static_cast<const void*>(ptr) : nullptr;
957}
const uint8_t * ptr
void ensure_cpu(uint32_t layer) const
Download a GPU-held layer into m_data before a CPU read.
std::pair< const uint8_t *, size_t > variant_bytes(const DataVariant &v)
Get a pointer to the raw bytes of a DataVariant and its size.
Definition DataUtils.cpp:95

References ensure_cpu(), m_data, ptr, and MayaFlux::Kakshya::variant_bytes().

+ Here is the call graph for this function: