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

◆ resize_texture()

void MayaFlux::Buffers::TextureBuffer::resize_texture ( uint32_t  new_width,
uint32_t  new_height 
)

Reallocate the GPU texture at new dimensions.

Resets the GPU texture handle so TextureProcessor allocates a fresh VKImage at the updated dimensions on the next processing cycle. Marks texture and geometry dirty. Invalidates the streaming staging buffer so it is reallocated at the correct size.

Parameters
new_widthNew texture width in pixels.
new_heightNew texture height in pixels.

Definition at line 154 of file TextureBuffer.cpp.

155{
156 if (new_width == m_width && new_height == m_height) {
157 return;
158 }
159
160 m_width = new_width;
161 m_height = new_height;
162 m_gpu_texture.reset();
163 m_texture_dirty = true;
164 m_geometry_dirty = true;
165
166 if (auto proc = get_texture_processor()) {
167 proc->invalidate_staging();
168 }
169}
std::shared_ptr< TextureProcessor > get_texture_processor() const
std::shared_ptr< Core::VKImage > m_gpu_texture

References get_texture_processor(), m_geometry_dirty, m_gpu_texture, m_height, m_texture_dirty, and m_width.

+ Here is the call graph for this function: