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

◆ upload_initial_pixels()

void MayaFlux::Buffers::TextureProcessor::upload_initial_pixels ( )
private

Upload initial pixel data to GPU texture.

Definition at line 127 of file TextureProcessor.cpp.

128{
129 if (!m_texture_buffer || !m_texture_buffer->has_texture()) {
130 return;
131 }
132
133 const auto& pixel_data = m_texture_buffer->m_pixel_data;
134 if (pixel_data.empty()) {
136 "TextureProcessor: no pixel data to upload (uninitialized texture)");
137 return;
138 }
139
141 loom.upload_data(
142 m_texture_buffer->get_texture(),
143 pixel_data.data(),
144 pixel_data.size());
145
147 "TextureProcessor: uploaded {} bytes of pixel data", pixel_data.size());
148}
#define MF_DEBUG(comp, ctx,...)
std::shared_ptr< TextureBuffer > m_texture_buffer
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
MAYAFLUX_API TextureLoom & get_texture_manager()
Get the global texture manager instance.

References MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, MayaFlux::Portal::Graphics::get_texture_manager(), m_texture_buffer, and MF_DEBUG.

Referenced by initialize_gpu_resources().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: