From 12491f35bbea7008b15fb0ba0ee7ea5bf6eb6b6c Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 15 Aug 2012 18:17:38 +0300 Subject: Fix transformation in eglfs backingstore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While not visible with forced-fullscreen windows, the formula used to set up positioning on the Y axis is wrong. (with the GL coordinate system Y goes 1..-1 when moving top-to-bottom) Taken from kms' version of the backingstore which had the formulas corrected. Change-Id: I460a4eec925e47b08453af4e093d719567af22ea Reviewed-by: Samuel Rødal --- src/plugins/platforms/eglfs/qeglfsbackingstore.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/eglfs/qeglfsbackingstore.cpp') diff --git a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp index 2caf1064cf..8ad0aab522 100644 --- a/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp +++ b/src/plugins/platforms/eglfs/qeglfsbackingstore.cpp @@ -124,8 +124,8 @@ void QEglFSBackingStore::flush(QWindow *window, const QRegion ®ion, const QPo GLfloat x1 = (r.left() / sr.width()) * 2 - 1; GLfloat x2 = (r.right() / sr.width()) * 2 - 1; - GLfloat y1 = (r.top() / sr.height()) * 2 - 1; - GLfloat y2 = (r.bottom() / sr.height()) * 2 - 1; + GLfloat y1 = -1 * ((r.top() / sr.height()) * 2 - 1); + GLfloat y2 = -1 * ((r.bottom() / sr.height()) * 2 - 1); const GLfloat vertexCoordinates[] = { x1, y1, -- cgit v1.2.3