diff options
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp | 5 | ||||
-rw-r--r-- | src/quick/scenegraph/shaders/visualization.frag | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp index 2f94bad75d..dbea0faa9a 100644 --- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp +++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp @@ -2766,7 +2766,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/shaders/visualization.frag b/src/quick/scenegraph/shaders/visualization.frag index 205b726c03..15c81f2447 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) * tweak.z * 0.1; + c.xyz += pow(max(sin(pos.x + pos.y), 0.0), 2.0) * tweak.z * 0.25; gl_FragColor = c; } |