plugins/screencast: Simplify projection matrix code in window source

Split orthographic matrix construction and y inversion in two steps to
improve code readability.
master
Vlad Zahorodnii 2 years ago
parent 83c38b0907
commit a1a09e91ab

@ -53,8 +53,8 @@ void WindowScreenCastSource::render(GLFramebuffer *target)
{
const QRectF geometry = m_window->clientGeometry();
QMatrix4x4 projectionMatrix;
projectionMatrix.ortho(geometry.x(), geometry.x() + geometry.width(),
geometry.y(), geometry.y() + geometry.height(), -1, 1);
projectionMatrix.scale(1, -1);
projectionMatrix.ortho(geometry);
WindowPaintData data;
data.setProjectionMatrix(projectionMatrix);

Loading…
Cancel
Save