MayaFlux 0.1.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 121 of file TextureProcessor.cpp.

122{
123 if (!m_texture_buffer || !m_texture_buffer->has_texture()) {
124 return;
125 }
126
127 const auto& pixel_data = m_texture_buffer->m_pixel_data;
128 if (pixel_data.empty()) {
130 "TextureProcessor: no pixel data to upload (uninitialized texture)");
131 return;
132 }
133
135 loom.upload_data(
136 m_texture_buffer->get_texture(),
137 pixel_data.data(),
138 pixel_data.size());
139
141 "TextureProcessor: uploaded {} bytes of pixel data", pixel_data.size());
142}
#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: