Browse Source

Shaders: minor deconfusement and unredundancyation in a test.

pull/547/head
Vladimír Vondruš 4 years ago
parent
commit
f893d3ec76
  1. 4
      src/Magnum/Shaders/Test/FlatGLTest.cpp
  2. 5
      src/Magnum/Shaders/Test/PhongGLTest.cpp

4
src/Magnum/Shaders/Test/FlatGLTest.cpp

@ -2918,7 +2918,7 @@ template<FlatGL2D::Flag flag> 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<FlatGL2D::Flag flag> 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)

5
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);
}

Loading…
Cancel
Save