diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-10-24 10:48:20 +0300 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-10-24 10:48:49 +0200 |
commit | b49dd6f57b9bf29a88da5adbf5b4b859ce30dd13 (patch) | |
tree | e2d7aa8d486a622baa2a4da9cfe9f5667982a9c0 /examples | |
parent | 7d13f20e63698f64a2773c758ac4c0fc4c82892b (diff) |
Fix mirrored Y coordinates in qwindow-compositor.
Change-Id: I432aa2fdf231301fda99b68e863ecc964c550781
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/qwindow-compositor/surfacerenderer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/qwindow-compositor/surfacerenderer.cpp b/examples/qwindow-compositor/surfacerenderer.cpp index 421309d8e..82a868b25 100644 --- a/examples/qwindow-compositor/surfacerenderer.cpp +++ b/examples/qwindow-compositor/surfacerenderer.cpp @@ -54,10 +54,10 @@ void SurfaceRenderer::drawTexture(int textureId, const QRectF &geometry, int dep { GLfloat zValue = depth / 1000.0f; //Set Texture and Vertex coordinates - GLfloat textureCoordinates[] = { 0, 0, - 1, 0, + GLfloat textureCoordinates[] = { 0, 1, 1, 1, - 0, 1 + 1, 0, + 0, 0 }; GLfloat vertexCoordinates[] = { geometry.left(), geometry.top(), zValue, @@ -68,7 +68,7 @@ void SurfaceRenderer::drawTexture(int textureId, const QRectF &geometry, int dep //Set matrix to transfrom geometry values into gl coordinate space. m_transformMatrix.setToIdentity(); - m_transformMatrix.scale( 2.0f / m_surface->geometry().width(), 2.0f / m_surface->geometry().height()); + m_transformMatrix.scale( 2.0f / m_surface->geometry().width(), -2.0f / m_surface->geometry().height()); m_transformMatrix.translate(-m_surface->geometry().width() / 2.0f, -m_surface->geometry().height() / 2.0f); m_shaderProgram->bind(); |