aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-01-16 15:46:46 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-01-16 18:02:46 +0100
commitb0afb913e6e3440a61c2a692b1d15ee017fb3c40 (patch)
treedba3f96a42fe08eb108afe83b271101fef00382e /src/quick/scenegraph
parenta704040dc4dd312e6d0552e6d9e6715f988ea39a (diff)
parent291aea14636a0e779d874a01630524facb1397dd (diff)
Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/dev
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp5
-rw-r--r--src/quick/scenegraph/qsgwindowsrenderloop.cpp2
-rw-r--r--src/quick/scenegraph/shaders/visualization.frag2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index aef5b4ee79..fd9b2a4480 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -2828,7 +2828,10 @@ void Renderer::visualizeBatch(Batch *b)
g = gn->geometry();
shader->setUniformValue(shader->matrix, matrix * *gn->matrix());
glVertexAttribPointer(a.position, a.tupleSize, a.type, false, g->sizeOfVertex(), (void *) (qintptr) offset);
- glDrawElements(g->drawingMode(), g->indexCount(), g->indexType(), g->indexData());
+ if (g->indexCount())
+ glDrawElements(g->drawingMode(), g->indexCount(), g->indexType(), g->indexData());
+ else
+ glDrawArrays(g->drawingMode(), 0, g->vertexCount());
offset += g->sizeOfVertex() * g->vertexCount();
e = e->nextInBatch;
}
diff --git a/src/quick/scenegraph/qsgwindowsrenderloop.cpp b/src/quick/scenegraph/qsgwindowsrenderloop.cpp
index 58d618a049..9f74e259e3 100644
--- a/src/quick/scenegraph/qsgwindowsrenderloop.cpp
+++ b/src/quick/scenegraph/qsgwindowsrenderloop.cpp
@@ -437,7 +437,7 @@ void QSGWindowsRenderLoop::renderWindow(QQuickWindow *window)
d->fireFrameSwapped();
qCDebug(QSG_LOG_TIME_RENDERLOOP()).nospace()
- << "Frame rendered with 'windows' renderloop in: " << time_swapped << "ms"
+ << "Frame rendered with 'windows' renderloop in: " << (time_swapped - time_start) / 1000000 << "ms"
<< ", polish=" << (time_polished - time_start) / 1000000
<< ", sync=" << (time_synced - time_polished) / 1000000
<< ", render=" << (time_rendered - time_synced) / 1000000
diff --git a/src/quick/scenegraph/shaders/visualization.frag b/src/quick/scenegraph/shaders/visualization.frag
index 6cfeac1985..458d9dde14 100644
--- a/src/quick/scenegraph/shaders/visualization.frag
+++ b/src/quick/scenegraph/shaders/visualization.frag
@@ -6,6 +6,6 @@ varying mediump vec2 pos;
void main(void)
{
lowp vec4 c = color;
- c.xyz += pow(max(sin(pos.x + pos.y), 0.0), 2.0) * pattern * 0.1;
+ c.xyz += pow(max(sin(pos.x + pos.y), 0.0), 2.0) * pattern * 0.25;
gl_FragColor = c;
}