remove glm swizzling for better debugability

This commit is contained in:
2017-11-12 17:39:30 +00:00
parent e280629cf2
commit 4473bc8bd4
9 changed files with 63 additions and 49 deletions

View File

@@ -186,7 +186,7 @@ public:
m_canvas->m_layers[m_layer_idx].m_dirty_face[i] = m_old_dirty[i];
m_canvas->m_layers[m_layer_idx].m_rtt[i].bindTexture();
glm::vec2 box_sz = m_box[i].zw() - m_box[i].xy();
glm::vec2 box_sz = zw(m_box[i]) - xy(m_box[i]);
glTexSubImage2D(GL_TEXTURE_2D, 0, (int)m_box[i].x, (int)m_box[i].y, (int)box_sz.x, (int)box_sz.y, GL_RGBA, GL_UNSIGNED_BYTE, m_image[i].get());
m_canvas->m_layers[m_layer_idx].m_rtt[i].unbindTexture();
}
@@ -196,7 +196,7 @@ public:
size_t mem = 0;
for (int i = 0; i < 6; i++)
{
glm::ivec2 sz = m_box[i].zw() - m_box[i].xy();
glm::ivec2 sz = zw(m_box[i]) - xy(m_box[i]);
mem += sz.x * sz.y * 4 + sizeof(*this);
}
return mem;