Extract preview final composite wrapper
This commit is contained in:
@@ -205,10 +205,21 @@ void execute_stroke_preview_final_composite_pass(const StrokePreviewCompositePas
|
||||
.draw_composite = [&] {
|
||||
inputs.draw_composite();
|
||||
},
|
||||
});
|
||||
});
|
||||
assert(composite_ok);
|
||||
}
|
||||
|
||||
void copy_stroke_preview_result_to_texture(Texture2D& texture, glm::vec2 size);
|
||||
|
||||
void execute_stroke_preview_final_composite_and_copy(
|
||||
const StrokePreviewCompositePassInputs& inputs,
|
||||
Texture2D& preview_texture,
|
||||
glm::vec2 size)
|
||||
{
|
||||
execute_stroke_preview_final_composite_pass(inputs);
|
||||
copy_stroke_preview_result_to_texture(preview_texture, size);
|
||||
}
|
||||
|
||||
void copy_stroke_preview_framebuffer_to_texture(
|
||||
Texture2D& texture,
|
||||
glm::vec2 size,
|
||||
@@ -838,7 +849,7 @@ void NodeStrokePreview::draw_stroke_immediate()
|
||||
},
|
||||
.finish_main_pass = [&] {},
|
||||
.execute_final_composite = [&] {
|
||||
execute_stroke_preview_final_composite_pass(
|
||||
execute_stroke_preview_final_composite_and_copy(
|
||||
StrokePreviewCompositePassInputs {
|
||||
.resolution = size,
|
||||
.pattern_scale = patt_scale,
|
||||
@@ -852,11 +863,11 @@ void NodeStrokePreview::draw_stroke_immediate()
|
||||
.draw_composite = [&] {
|
||||
m_plane.draw_fill();
|
||||
},
|
||||
});
|
||||
},
|
||||
.copy_preview_result = [&] {
|
||||
copy_stroke_preview_result_to_texture(m_tex_preview, size);
|
||||
},
|
||||
m_tex_preview,
|
||||
size);
|
||||
},
|
||||
.copy_preview_result = [&] {},
|
||||
});
|
||||
assert(sequence_ok);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user