From cd39463876463743b80351940115501fd80fc8de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 26 Sep 2019 13:00:24 +0200 Subject: [PATCH] Shaders: verify that no GL errors happened during construction. --- src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp | 4 ++++ src/Magnum/Shaders/Test/FlatGLTest.cpp | 2 ++ src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp | 2 ++ src/Magnum/Shaders/Test/PhongGLTest.cpp | 2 ++ src/Magnum/Shaders/Test/VectorGLTest.cpp | 4 ++++ src/Magnum/Shaders/Test/VertexColorGLTest.cpp | 4 ++++ 6 files changed, 18 insertions(+) diff --git a/src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp b/src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp index 3beb6c0e7..9ba2b0ba1 100644 --- a/src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp +++ b/src/Magnum/Shaders/Test/DistanceFieldVectorGLTest.cpp @@ -55,6 +55,8 @@ void DistanceFieldVectorGLTest::construct2D() { #endif CORRADE_VERIFY(shader.validate().first); } + + MAGNUM_VERIFY_NO_GL_ERROR(); } void DistanceFieldVectorGLTest::construct3D() { @@ -66,6 +68,8 @@ void DistanceFieldVectorGLTest::construct3D() { #endif CORRADE_VERIFY(shader.validate().first); } + + MAGNUM_VERIFY_NO_GL_ERROR(); } void DistanceFieldVectorGLTest::constructMove2D() { diff --git a/src/Magnum/Shaders/Test/FlatGLTest.cpp b/src/Magnum/Shaders/Test/FlatGLTest.cpp index c4a91c841..67913e4f1 100644 --- a/src/Magnum/Shaders/Test/FlatGLTest.cpp +++ b/src/Magnum/Shaders/Test/FlatGLTest.cpp @@ -233,6 +233,8 @@ template void FlatGLTest::construct() { #endif CORRADE_VERIFY(shader.validate().first); } + + MAGNUM_VERIFY_NO_GL_ERROR(); } template void FlatGLTest::constructMove() { diff --git a/src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp b/src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp index bb5a0b6d5..41477c75c 100644 --- a/src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp +++ b/src/Magnum/Shaders/Test/MeshVisualizerGLTest.cpp @@ -62,6 +62,8 @@ void MeshVisualizerGLTest::construct() { #endif CORRADE_VERIFY(shader.validate().first); } + + MAGNUM_VERIFY_NO_GL_ERROR(); } #if !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) diff --git a/src/Magnum/Shaders/Test/PhongGLTest.cpp b/src/Magnum/Shaders/Test/PhongGLTest.cpp index b0c96dcce..4d735050c 100644 --- a/src/Magnum/Shaders/Test/PhongGLTest.cpp +++ b/src/Magnum/Shaders/Test/PhongGLTest.cpp @@ -345,6 +345,8 @@ void PhongGLTest::construct() { #endif CORRADE_VERIFY(shader.validate().first); } + + MAGNUM_VERIFY_NO_GL_ERROR(); } void PhongGLTest::constructMove() { diff --git a/src/Magnum/Shaders/Test/VectorGLTest.cpp b/src/Magnum/Shaders/Test/VectorGLTest.cpp index 3820f965d..8c2368938 100644 --- a/src/Magnum/Shaders/Test/VectorGLTest.cpp +++ b/src/Magnum/Shaders/Test/VectorGLTest.cpp @@ -55,6 +55,8 @@ void VectorGLTest::construct2D() { #endif CORRADE_VERIFY(shader.validate().first); } + + MAGNUM_VERIFY_NO_GL_ERROR(); } void VectorGLTest::construct3D() { @@ -66,6 +68,8 @@ void VectorGLTest::construct3D() { #endif CORRADE_VERIFY(shader.validate().first); } + + MAGNUM_VERIFY_NO_GL_ERROR(); } void VectorGLTest::constructMove2D() { diff --git a/src/Magnum/Shaders/Test/VertexColorGLTest.cpp b/src/Magnum/Shaders/Test/VertexColorGLTest.cpp index 588b43fdb..85d9eb6f9 100644 --- a/src/Magnum/Shaders/Test/VertexColorGLTest.cpp +++ b/src/Magnum/Shaders/Test/VertexColorGLTest.cpp @@ -55,6 +55,8 @@ void VertexColorGLTest::construct2D() { #endif CORRADE_VERIFY(shader.validate().first); } + + MAGNUM_VERIFY_NO_GL_ERROR(); } void VertexColorGLTest::construct3D() { @@ -66,6 +68,8 @@ void VertexColorGLTest::construct3D() { #endif CORRADE_VERIFY(shader.validate().first); } + + MAGNUM_VERIFY_NO_GL_ERROR(); } void VertexColorGLTest::constructMove2D() {