summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/texture/tst_texture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/render/texture/tst_texture.cpp')
-rw-r--r--tests/auto/render/texture/tst_texture.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/render/texture/tst_texture.cpp b/tests/auto/render/texture/tst_texture.cpp
index 3231f76d9..b0ce782a0 100644
--- a/tests/auto/render/texture/tst_texture.cpp
+++ b/tests/auto/render/texture/tst_texture.cpp
@@ -72,12 +72,35 @@ private:
void checkPropertyMirroring();
private slots:
+ void checkDefaults();
void checkFrontendPropertyNotifications();
void checkPropertyMirroring();
void checkPropertyChanges();
void checkTextureImageBookeeping();
};
+void tst_RenderTexture::checkDefaults()
+{
+ Qt3DRender::Render::Texture backend;
+
+ QCOMPARE(backend.properties().format, Qt3DRender::QAbstractTexture::NoFormat);
+ QCOMPARE(backend.properties().width, 1);
+ QCOMPARE(backend.properties().height, 1);
+ QCOMPARE(backend.properties().depth, 1);
+ QCOMPARE(backend.properties().layers, 1);
+ QCOMPARE(backend.properties().mipLevels, 1);
+ QCOMPARE(backend.properties().samples, 1);
+ QCOMPARE(backend.properties().generateMipMaps, false);
+ QCOMPARE(backend.parameters().magnificationFilter, Qt3DRender::QAbstractTexture::Nearest);
+ QCOMPARE(backend.parameters().minificationFilter, Qt3DRender::QAbstractTexture::Nearest);
+ QCOMPARE(backend.parameters().wrapModeX, Qt3DRender::QTextureWrapMode::ClampToEdge);
+ QCOMPARE(backend.parameters().wrapModeY, Qt3DRender::QTextureWrapMode::ClampToEdge);
+ QCOMPARE(backend.parameters().wrapModeZ, Qt3DRender::QTextureWrapMode::ClampToEdge);
+ QCOMPARE(backend.parameters().maximumAnisotropy, 1.0f);
+ QCOMPARE(backend.parameters().comparisonFunction, Qt3DRender::QAbstractTexture::CompareLessEqual);
+ QCOMPARE(backend.parameters().comparisonMode, Qt3DRender::QAbstractTexture::CompareNone);
+}
+
void tst_RenderTexture::checkFrontendPropertyNotifications()
{
// GIVEN