MayaFlux 0.4.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 137 of file TextureProcessor.cpp.

138{
139 if (!m_texture_buffer || !m_texture_buffer->has_texture()) {
140 return;
141 }
142
143 const auto& pixel_data = m_texture_buffer->m_pixel_data;
144 if (pixel_data.empty()) {
146 "TextureProcessor: no pixel data to upload (uninitialized texture)");
147 return;
148 }
149
151 loom.upload_data(
152 m_texture_buffer->get_texture(),
153 pixel_data.data(),
154 pixel_data.size());
155
157 "TextureProcessor: uploaded {} bytes of pixel data", pixel_data.size());
158}
#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: