summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaj Grönholm <kaj.gronholm@qt.io>2019-04-09 15:37:45 +0300
committerKaj Grönholm <kaj.gronholm@qt.io>2019-04-10 07:05:17 +0000
commitd8953cec46c31ff2774a622f564a40d010cd56ca (patch)
treecef99936b0bec34d02cc54fd766407915562bfa7
parent8e20af80326c509e14eb422670547743361e53af (diff)
Fix building opengl runtime autotests
IDynamicObjectSystem setShaderCodeLibraryVersion() was removed since ddcddb474c and Qt3DSAssert definition is required to link. Task-number: QT3DS-3213 Change-Id: Ibde89d64e1a04f48c0510de590a5211d71696e3c Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
-rw-r--r--tests/auto/runtime/Qt3DSRenderTestBase.cpp33
1 files changed, 7 insertions, 26 deletions
diff --git a/tests/auto/runtime/Qt3DSRenderTestBase.cpp b/tests/auto/runtime/Qt3DSRenderTestBase.cpp
index 5892e67e..0a74e286 100644
--- a/tests/auto/runtime/Qt3DSRenderTestBase.cpp
+++ b/tests/auto/runtime/Qt3DSRenderTestBase.cpp
@@ -42,6 +42,13 @@ void* gpEmptyBucketArray[2] = { nullptr, (void*)uintptr_t(~0) };
}
namespace qt3ds {
+
+void Qt3DSAssert(const char *exp, const char *file, int line, bool *ignore)
+{
+ Q_UNUSED(ignore)
+ qFatal("Assertion thrown %s(%d): %s", file, line, exp);
+}
+
namespace render {
SEndlType Endl;
}
@@ -75,32 +82,6 @@ bool NVRenderTestBase::initializeQt3DSRenderer(QSurfaceFormat format)
m_rc = m_factory->GetQt3DSRenderContext();
m_renderImpl = new qt3ds::render::Qt3DSRendererImpl(*m_rc);
- QString versionString;
- switch ((QT3DSU32)m_rc->GetRenderContext().GetRenderContextType()) {
- case NVRenderContextValues::GLES2:
- versionString = QLatin1Literal("gles2");
- break;
- case NVRenderContextValues::GL2:
- versionString = QLatin1Literal("gl2");
- break;
- case NVRenderContextValues::GLES3:
- versionString = QLatin1Literal("gles3");
- break;
- case NVRenderContextValues::GL3:
- versionString = QLatin1Literal("gl3");
- break;
- case NVRenderContextValues::GLES3PLUS:
- versionString = QLatin1Literal("gles3x");
- break;
- case NVRenderContextValues::GL4:
- versionString = QLatin1Literal("gl4");
- break;
- default:
- break;
- }
-
- m_rc->GetDynamicObjectSystem().setShaderCodeLibraryVersion(versionString);
-
return true;
}