summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorSarah Smith <sarah.j.smith@nokia.com>2012-05-03 18:53:29 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-03 11:55:50 +0200
commitbb5ebf2a04dc2daaf6f63b365b377da3dffacf44 (patch)
treec6b10e88545654b00c9830a659267f98af15629c /demos
parent5d8871017162c6145a81386b425c1664a3e3972f (diff)
Fix qml3d tests incl windows.
There are a lot of problems with our tests on platforms where the fixed-function pipeline is in force, that is no shaders are available. We have code paths that are supposed to deal with that but they're poorly maintained and now crash. Try to fix a few of them, and work around others which are exposed by the qml3d tests on windows CI boxes (that have software OpenGL 1.x). We notice that QT_QPA_PLATFORM=minimal causes a crash with QML tests that have a test function without a surrounding TestCase element. Let's fix that and see if it helps also the mysterious windows test crashing problem. Task-number: QTBUG-25276 Change-Id: Ieeb67536f86467bb6819b62319ac3cee2219a8ae Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
Diffstat (limited to 'demos')
-rw-r--r--demos/qt3d/cubehouse/projectivetextureeffect.cpp2
-rw-r--r--demos/qt3d/photobrowser3d/thumbnaileffect.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/demos/qt3d/cubehouse/projectivetextureeffect.cpp b/demos/qt3d/cubehouse/projectivetextureeffect.cpp
index 55885c966..af1e5616d 100644
--- a/demos/qt3d/cubehouse/projectivetextureeffect.cpp
+++ b/demos/qt3d/cubehouse/projectivetextureeffect.cpp
@@ -75,6 +75,8 @@ void ProjectiveTextureEffect::update(QGLPainter *painter, QGLPainter::Updates up
recalulateObjectLinearTexgenMatrix();
matrixDirty = false;
}
+ if (!program())
+ return;
program()->setUniformValue("objectLinearTexgenMatrix",
objectLinearTexgenMatrix);
diff --git a/demos/qt3d/photobrowser3d/thumbnaileffect.cpp b/demos/qt3d/photobrowser3d/thumbnaileffect.cpp
index bb60500fb..d85deba5d 100644
--- a/demos/qt3d/photobrowser3d/thumbnaileffect.cpp
+++ b/demos/qt3d/photobrowser3d/thumbnaileffect.cpp
@@ -145,7 +145,6 @@ void ThumbnailEffect::setActive(QGLPainter *painter, bool flag)
void ThumbnailEffect::update
(QGLPainter *painter, QGLPainter::Updates updates)
{
- Q_ASSERT(d->program);
if ((updates & QGLPainter::UpdateMatrices) != 0)
{
d->program->setUniformValue(d->matrixUniform,