Route NodeCanvas grid setup through helper
This commit is contained in:
@@ -18,6 +18,11 @@ agent or engineer to remove them without reconstructing context from chat.
|
|||||||
|
|
||||||
## Recent Reductions
|
## Recent Reductions
|
||||||
|
|
||||||
|
- 2026-06-13: DEBT-0036 was narrowed again. `NodeCanvas` now reuses
|
||||||
|
`legacy_canvas_draw_merge_services.h` for retained checkerboard grid shader
|
||||||
|
setup and the final cached-layer texture redraw setup. NodeCanvas still owns
|
||||||
|
panorama layer traversal, onion-frame drawing, blend destination copies,
|
||||||
|
sampler/texture binding, and draw ordering.
|
||||||
- 2026-06-13: DEBT-0036 was narrowed again. `Canvas::stroke_draw_mix` now
|
- 2026-06-13: DEBT-0036 was narrowed again. `Canvas::stroke_draw_mix` now
|
||||||
reuses `legacy_canvas_stroke_composite_services.h` for mixer-pass retained
|
reuses `legacy_canvas_stroke_composite_services.h` for mixer-pass retained
|
||||||
`kShader::CompDraw` binding and blend uniform writes, with the helper now
|
`kShader::CompDraw` binding and blend uniform writes, with the helper now
|
||||||
|
|||||||
@@ -2996,6 +2996,10 @@ Results:
|
|||||||
helper for mixer-pass `CompDraw` setup, while preserving its caller-specific
|
helper for mixer-pass `CompDraw` setup, while preserving its caller-specific
|
||||||
texture slot uniforms. Mixer framebuffer/scissor state, sampler and texture
|
texture slot uniforms. Mixer framebuffer/scissor state, sampler and texture
|
||||||
binding, and draw execution remain retained.
|
binding, and draw execution remain retained.
|
||||||
|
- `NodeCanvas` panorama drawing now uses the same retained draw-merge shader
|
||||||
|
setup helper for checkerboard grids and final cached-layer texture redraws;
|
||||||
|
onion-frame traversal, blend copies, texture binding, and draw order remain
|
||||||
|
retained in the node.
|
||||||
- Canvas thumbnail layer blending now uses the same canvas destination-feedback
|
- Canvas thumbnail layer blending now uses the same canvas destination-feedback
|
||||||
plan for framebuffer-fetch versus texture-copy decisions; the thumbnail draw
|
plan for framebuffer-fetch versus texture-copy decisions; the thumbnail draw
|
||||||
itself still executes through retained OpenGL canvas code under DEBT-0036.
|
itself still executes through retained OpenGL canvas code under DEBT-0036.
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
#include "app_core/document_animation.h"
|
#include "app_core/document_animation.h"
|
||||||
#include "app.h"
|
#include "app.h"
|
||||||
#include "node_panel_grid.h"
|
#include "node_panel_grid.h"
|
||||||
|
#include "legacy_canvas_draw_merge_services.h"
|
||||||
#include "legacy_preference_storage.h"
|
#include "legacy_preference_storage.h"
|
||||||
#include "legacy_ui_gl_dispatch.h"
|
#include "legacy_ui_gl_dispatch.h"
|
||||||
#include "legacy_ui_overlay_services.h"
|
#include "legacy_ui_overlay_services.h"
|
||||||
@@ -374,9 +375,11 @@ void NodeCanvas::draw()
|
|||||||
m_canvas->m_plane_transform[plane_index] *
|
m_canvas->m_plane_transform[plane_index] *
|
||||||
glm::translate(glm::vec3(0, 0, -1));
|
glm::translate(glm::vec3(0, 0, -1));
|
||||||
|
|
||||||
ShaderManager::use(kShader::Checkerboard);
|
pp::panopainter::setup_legacy_canvas_draw_merge_checkerboard_shader(
|
||||||
ShaderManager::u_int(kShaderUniform::Colorize, false);
|
pp::panopainter::LegacyCanvasDrawMergeCheckerboardUniforms {
|
||||||
ShaderManager::u_mat4(kShaderUniform::MVP, plane_mvp);
|
.mvp = plane_mvp,
|
||||||
|
.colorize = false,
|
||||||
|
});
|
||||||
m_face_plane.draw_fill();
|
m_face_plane.draw_fill();
|
||||||
|
|
||||||
int z = 1;
|
int z = 1;
|
||||||
@@ -425,9 +428,11 @@ void NodeCanvas::draw()
|
|||||||
m_canvas->m_plane_transform[plane_index] *
|
m_canvas->m_plane_transform[plane_index] *
|
||||||
glm::translate(glm::vec3(0, 0, -1));
|
glm::translate(glm::vec3(0, 0, -1));
|
||||||
|
|
||||||
ShaderManager::use(kShader::Checkerboard);
|
pp::panopainter::setup_legacy_canvas_draw_merge_checkerboard_shader(
|
||||||
ShaderManager::u_int(kShaderUniform::Colorize, false);
|
pp::panopainter::LegacyCanvasDrawMergeCheckerboardUniforms {
|
||||||
ShaderManager::u_mat4(kShaderUniform::MVP, plane_mvp);
|
.mvp = plane_mvp,
|
||||||
|
.colorize = false,
|
||||||
|
});
|
||||||
m_face_plane.draw_fill();
|
m_face_plane.draw_fill();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -676,9 +681,11 @@ void NodeCanvas::draw()
|
|||||||
m_canvas->m_plane_transform[plane_index] *
|
m_canvas->m_plane_transform[plane_index] *
|
||||||
glm::translate(glm::vec3(0, 0, -1.f));
|
glm::translate(glm::vec3(0, 0, -1.f));
|
||||||
|
|
||||||
ShaderManager::use(kShader::Checkerboard);
|
pp::panopainter::setup_legacy_canvas_draw_merge_checkerboard_shader(
|
||||||
ShaderManager::u_int(kShaderUniform::Colorize, false);
|
pp::panopainter::LegacyCanvasDrawMergeCheckerboardUniforms {
|
||||||
ShaderManager::u_mat4(kShaderUniform::MVP, plane_mvp);
|
.mvp = plane_mvp,
|
||||||
|
.colorize = false,
|
||||||
|
});
|
||||||
m_face_plane.draw_fill();
|
m_face_plane.draw_fill();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -686,9 +693,11 @@ void NodeCanvas::draw()
|
|||||||
m_sampler.bind(0);
|
m_sampler.bind(0);
|
||||||
set_active_texture_unit(0);
|
set_active_texture_unit(0);
|
||||||
m_cache_rtt.bindTexture();
|
m_cache_rtt.bindTexture();
|
||||||
ShaderManager::use(kShader::Texture);
|
pp::panopainter::setup_legacy_canvas_draw_merge_texture_shader(
|
||||||
ShaderManager::u_int(kShaderUniform::Tex, 0);
|
pp::panopainter::LegacyCanvasDrawMergeTextureUniforms {
|
||||||
ShaderManager::u_mat4(kShaderUniform::MVP, glm::ortho<float>(-1, 1, -1, 1));
|
.mvp = glm::ortho<float>(-1, 1, -1, 1),
|
||||||
|
.texture_slot = 0,
|
||||||
|
});
|
||||||
m_face_plane.draw_fill();
|
m_face_plane.draw_fill();
|
||||||
m_cache_rtt.unbindTexture();
|
m_cache_rtt.unbindTexture();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user