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

◆ create_gpu_texture()

std::shared_ptr< Core::VKImage > MayaFlux::Buffers::TextureProcessor::create_gpu_texture ( )
private

Create VKImage for texture storage.

Definition at line 223 of file TextureProcessor.cpp.

224{
225 if (!m_texture_buffer) {
226 return nullptr;
227 }
228
230
231 auto texture = loom.create_2d(
232 m_texture_buffer->get_width(),
233 m_texture_buffer->get_height(),
234 m_texture_buffer->get_format(),
235 nullptr,
236 1);
237
238 if (!texture) {
239 error<std::runtime_error>(
242 std::source_location::current(),
243 "Failed to create GPU texture via TextureLoom");
244 }
245
247 "TextureProcessor: created GPU VKImage {}x{}",
248 m_texture_buffer->get_width(), m_texture_buffer->get_height());
249
250 return texture;
251}
#define MF_INFO(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_INFO.

Referenced by initialize_gpu_resources(), and update_pixels_if_dirty().

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