From f893d3ec76f17560d90f5dadcdfea19757becb71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 27 Jan 2022 19:45:16 +0100 Subject: [PATCH] Shaders: minor deconfusement and unredundancyation in a test. --- src/Magnum/Shaders/Test/FlatGLTest.cpp | 4 ++-- src/Magnum/Shaders/Test/PhongGLTest.cpp | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Magnum/Shaders/Test/FlatGLTest.cpp b/src/Magnum/Shaders/Test/FlatGLTest.cpp index 94f496827..956bd18e0 100644 --- a/src/Magnum/Shaders/Test/FlatGLTest.cpp +++ b/src/Magnum/Shaders/Test/FlatGLTest.cpp @@ -2918,7 +2918,7 @@ template void FlatGLTest::renderInstanced2D() { Matrix3::projection({2.1f, 2.1f})* Matrix3::scaling(Vector2{0.4f})); - if(data.flags & FlatGL3D::Flag::TextureTransformation) + if(data.flags & FlatGL2D::Flag::TextureTransformation) shader.setTextureMatrix(Matrix3::scaling( #ifndef MAGNUM_TARGET_GLES2 /* Slices of the texture array have half the height */ @@ -2970,7 +2970,7 @@ template void FlatGLTest::renderInstanced2D() { FlatMaterialUniform{} .setColor(data.flags & FlatGL2D::Flag::Textured ? 0xffffff_rgbf : 0xffff00_rgbf) }}; - if(data.flags & FlatGL3D::Flag::TextureTransformation) + if(data.flags & FlatGL2D::Flag::TextureTransformation) shader.bindTextureTransformationBuffer(textureTransformationUniform); shader.bindTransformationProjectionBuffer(transformationProjectionUniform) .bindDrawBuffer(drawUniform) diff --git a/src/Magnum/Shaders/Test/PhongGLTest.cpp b/src/Magnum/Shaders/Test/PhongGLTest.cpp index 749bfe4ac..74f3ffe15 100644 --- a/src/Magnum/Shaders/Test/PhongGLTest.cpp +++ b/src/Magnum/Shaders/Test/PhongGLTest.cpp @@ -1469,10 +1469,7 @@ void PhongGLTest::bindTextureArraysInvalid() { .bindDiffuseTexture(textureArray) .bindSpecularTexture(textureArray) .bindNormalTexture(textureArray) - #ifndef MAGNUM_TARGET_GLES2 - .bindObjectIdTexture(textureArray) - #endif - ; + .bindObjectIdTexture(textureArray); CORRADE_COMPARE(out.str(), data.message); }