Move Win32 async context ownership and trim canvas draw setup
This commit is contained in:
@@ -385,32 +385,14 @@ void NodeCanvas::draw()
|
||||
}),
|
||||
});
|
||||
|
||||
const auto draw_merged_texture_plane = [&](int plane_index) {
|
||||
pp::panopainter::execute_legacy_canvas_draw_merge_layer_texture(
|
||||
{
|
||||
.mvp = proj * camera *
|
||||
m_canvas->m_plane_transform[plane_index] *
|
||||
glm::translate(glm::vec3(0, 0, -1)),
|
||||
.texture_slot = 0,
|
||||
.alpha = 1.f,
|
||||
.highlight = false,
|
||||
},
|
||||
{
|
||||
.bind_sampler = [&] {
|
||||
m_sampler.bind(0);
|
||||
set_active_texture_unit(0);
|
||||
},
|
||||
.bind_layer_texture = [&] {
|
||||
m_canvas->m_layers_merge.rtt(plane_index).bindTexture();
|
||||
},
|
||||
.draw = [&] {
|
||||
m_face_plane.draw_fill();
|
||||
},
|
||||
.unbind_layer_texture = [&] {
|
||||
m_canvas->m_layers_merge.rtt(plane_index).unbindTexture();
|
||||
},
|
||||
});
|
||||
};
|
||||
const auto draw_merged_texture_plane = pp::panopainter::make_legacy_canvas_draw_merge_layer_texture_draw(
|
||||
&m_canvas->m_layers_merge,
|
||||
&m_sampler,
|
||||
&m_face_plane,
|
||||
set_active_texture_unit,
|
||||
proj,
|
||||
camera,
|
||||
m_canvas->m_plane_transform);
|
||||
|
||||
for (int plane_index = 0; plane_index < 6; plane_index++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user