Move canvas layer merge GL mappings to renderer gl
This commit is contained in:
@@ -221,9 +221,9 @@ Known local toolchain state:
|
|||||||
Canvas stroke commit also consumes backend-owned saved viewport/clear/blend
|
Canvas stroke commit also consumes backend-owned saved viewport/clear/blend
|
||||||
state, history readback format/type, active texture units, fallback 2D
|
state, history readback format/type, active texture units, fallback 2D
|
||||||
texture unbind targets, and layer compositing copy targets.
|
texture unbind targets, and layer compositing copy targets.
|
||||||
Canvas layer merge rendering also consumes backend-owned depth/blend state,
|
Canvas layer merge rendering and explicit layer-merge compositing also consume
|
||||||
active texture units, fallback 2D texture unbind targets, and merge
|
backend-owned depth/blend state, active texture units, fallback 2D texture
|
||||||
framebuffer copy targets.
|
unbind targets, and merge framebuffer copy targets.
|
||||||
- `windows-msvc-vcpkg-headless` validates manifest install/configure/build/test
|
- `windows-msvc-vcpkg-headless` validates manifest install/configure/build/test
|
||||||
for the current headless component matrix; see DEBT-0007 for remaining app
|
for the current headless component matrix; see DEBT-0007 for remaining app
|
||||||
and platform triplet migration.
|
and platform triplet migration.
|
||||||
|
|||||||
@@ -765,9 +765,9 @@ Results:
|
|||||||
- Canvas stroke commit now routes saved viewport/clear/blend state, history
|
- Canvas stroke commit now routes saved viewport/clear/blend state, history
|
||||||
readbacks, active texture units, fallback 2D texture unbinds, and layer
|
readbacks, active texture units, fallback 2D texture unbinds, and layer
|
||||||
compositing copy targets through the renderer GL backend mapping.
|
compositing copy targets through the renderer GL backend mapping.
|
||||||
- Canvas layer merge rendering now routes depth/blend state, active texture
|
- Canvas layer merge rendering and explicit layer-merge compositing now route
|
||||||
units, fallback 2D texture unbinds, and merge framebuffer copy targets through
|
depth/blend state, active texture units, fallback 2D texture unbinds, and
|
||||||
the renderer GL backend mapping.
|
merge framebuffer copy targets through the renderer GL backend mapping.
|
||||||
- Known remaining warnings: legacy project/vendor diagnostics, Visual Studio
|
- Known remaining warnings: legacy project/vendor diagnostics, Visual Studio
|
||||||
vcpkg-manifest warning, `LNK4099` missing libyuv PDBs, and `LNK4098` runtime
|
vcpkg-manifest warning, `LNK4099` missing libyuv PDBs, and `LNK4098` runtime
|
||||||
library conflict from retained vendor binaries.
|
library conflict from retained vendor binaries.
|
||||||
|
|||||||
@@ -1433,7 +1433,7 @@ void Canvas::layer_merge(int source_idx, int dest_idx) // m_layer index
|
|||||||
{
|
{
|
||||||
// prepare common states
|
// prepare common states
|
||||||
glViewport(0, 0, m_width, m_height);
|
glViewport(0, 0, m_width, m_height);
|
||||||
glDisable(GL_BLEND);
|
glDisable(blend_state());
|
||||||
|
|
||||||
for (int i = 0; i < 6; i++)
|
for (int i = 0; i < 6; i++)
|
||||||
{
|
{
|
||||||
@@ -1450,9 +1450,9 @@ void Canvas::layer_merge(int source_idx, int dest_idx) // m_layer index
|
|||||||
m_layers[dest_idx]->face(i) = true;
|
m_layers[dest_idx]->face(i) = true;
|
||||||
|
|
||||||
// copy to tmp2 for layer blending
|
// copy to tmp2 for layer blending
|
||||||
glActiveTexture(GL_TEXTURE0);
|
set_active_texture_unit(0);
|
||||||
m_tex2[i].bind();
|
m_tex2[i].bind();
|
||||||
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, m_width, m_height);
|
glCopyTexSubImage2D(texture_2d_target(), 0, 0, 0, 0, 0, m_width, m_height);
|
||||||
m_tex2[i].unbind();
|
m_tex2[i].unbind();
|
||||||
|
|
||||||
m_sampler.bind(0);
|
m_sampler.bind(0);
|
||||||
@@ -1470,13 +1470,13 @@ void Canvas::layer_merge(int source_idx, int dest_idx) // m_layer index
|
|||||||
ShaderManager::u_int(kShaderUniform::UseDual, false);
|
ShaderManager::u_int(kShaderUniform::UseDual, false);
|
||||||
ShaderManager::u_int(kShaderUniform::UsePattern, false);
|
ShaderManager::u_int(kShaderUniform::UsePattern, false);
|
||||||
|
|
||||||
glActiveTexture(GL_TEXTURE0);
|
set_active_texture_unit(0);
|
||||||
m_tex2[i].bind();
|
m_tex2[i].bind();
|
||||||
glActiveTexture(GL_TEXTURE1);
|
set_active_texture_unit(1);
|
||||||
m_layers[source_idx]->rtt(i).bindTexture();
|
m_layers[source_idx]->rtt(i).bindTexture();
|
||||||
m_plane.draw_fill();
|
m_plane.draw_fill();
|
||||||
m_layers[source_idx]->rtt(i).unbindTexture();
|
m_layers[source_idx]->rtt(i).unbindTexture();
|
||||||
glActiveTexture(GL_TEXTURE0);
|
set_active_texture_unit(0);
|
||||||
m_tex2[i].unbind();
|
m_tex2[i].unbind();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user