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

◆ initialize_gpu_resources()

void MayaFlux::Buffers::NodeTextureProcessor::initialize_gpu_resources ( )
private

Definition at line 165 of file NodeTextureProcessor.cpp.

166{
167 if (!m_attached_buffer || m_attached_buffer->m_vertex_bytes.empty()) {
169 "NodeTextureProcessor: no attached buffer or empty vertex data");
170 return;
171 }
172
174 m_attached_buffer->m_vertex_bytes.data(),
175 m_attached_buffer->m_vertex_bytes.size(),
177
179
180 for (auto& [name, binding] : m_bindings) {
181 auto pixels = binding.node->get_pixel_buffer();
182 if (!pixels.empty()) {
183 loom.upload_data(binding.gpu_texture, pixels.data(), pixels.size_bytes());
184 }
185 }
186
188 "NodeTextureProcessor: uploaded {} bytes of vertex geometry",
189 m_attached_buffer->m_vertex_bytes.size());
190}
#define MF_ERROR(comp, ctx,...)
#define MF_DEBUG(comp, ctx,...)
std::shared_ptr< NodeTextureBuffer > m_attached_buffer
std::unordered_map< std::string, TextureBinding > m_bindings
void upload_to_gpu(const void *data, size_t size, const std::shared_ptr< VKBuffer > &target, const std::shared_ptr< VKBuffer > &staging)
Upload raw data to GPU buffer (auto-detects host-visible vs device-local)
@ 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_attached_buffer, m_bindings, MF_DEBUG, MF_ERROR, and MayaFlux::Buffers::upload_to_gpu().

Referenced by on_attach().

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