summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorgen Lind <jorgen.lind@digia.com>2014-02-03 15:21:54 +0100
committerLaszlo Agocs <laszlo.agocs@digia.com>2014-02-03 17:51:23 +0100
commit05076e4e16615741becfc434979502901cbf396a (patch)
tree0b4264943c24b52e455a1d994867431283106528
parentdd2f05a3bf7e35e1512a0510d27aba8a9b2cc26e (diff)
downloadqtwayland-05076e4e16615741becfc434979502901cbf396a.tar.gz
qtwayland-05076e4e16615741becfc434979502901cbf396a.tar.bz2
qtwayland-05076e4e16615741becfc434979502901cbf396a.zip
Server Buffer example draws clients inverse on the x axis
Change-Id: I888ef46381342af61a48c6e542ec564e67adfe13 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
-rw-r--r--examples/server-buffer/client/main.cpp2
-rw-r--r--examples/server-buffer/client/serverbufferrenderer.cpp6
-rw-r--r--examples/server-buffer/compositor/main.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/server-buffer/client/main.cpp b/examples/server-buffer/client/main.cpp
index b5ce8aec..1880f216 100644
--- a/examples/server-buffer/client/main.cpp
+++ b/examples/server-buffer/client/main.cpp
@@ -128,7 +128,7 @@ public slots:
const QSizeF buffer_size = m_server_buffer_list.at(i)->size();
qreal scale_x = buffer_size.width() / width();
- qreal scale_y = buffer_size.height() / height();
+ qreal scale_y = buffer_size.height() / height() * - 1;
qreal translate_left = (((buffer_size.width() / 2) / width()) * 2) - 1;
qreal translate_top = -(((buffer_size.height() / 2) / height()) * 2) + 1;
qreal translate_x = translate_left + ((x / width())*2);
diff --git a/examples/server-buffer/client/serverbufferrenderer.cpp b/examples/server-buffer/client/serverbufferrenderer.cpp
index b9aa7a01..9eafddd6 100644
--- a/examples/server-buffer/client/serverbufferrenderer.cpp
+++ b/examples/server-buffer/client/serverbufferrenderer.cpp
@@ -43,10 +43,10 @@
#include <QtGui/QOpenGLVertexArrayObject>
#include <QtGui/QOpenGLShaderProgram>
static const GLfloat uv_coords[] = {
- 1,1,
- 1,0,
- 0,1,
0,0,
+ 0,1,
+ 1,0,
+ 1,1,
};
static const GLfloat vertex_coords[] = {
diff --git a/examples/server-buffer/compositor/main.cpp b/examples/server-buffer/compositor/main.cpp
index c266b224..04cdde40 100644
--- a/examples/server-buffer/compositor/main.cpp
+++ b/examples/server-buffer/compositor/main.cpp
@@ -185,7 +185,7 @@ private slots:
if (sbi->supportsFormat(QWaylandServerBuffer::A8)) {
QRawFont defaultRaw = QRawFont::fromFont(QFont(), QFontDatabase::Latin);
- QVector<quint32> index = defaultRaw.glyphIndexesForString(QStringLiteral("A"));
+ QVector<quint32> index = defaultRaw.glyphIndexesForString(QStringLiteral("R"));
QDistanceField distanceField(defaultRaw, index.front(), true);
QImage img = distanceField.toImage(QImage::Format_Indexed8);