From d9b4207426022e3444543d34ece06b2c4e1daed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 27 Feb 2018 20:59:46 +0100 Subject: [PATCH] doc: disable particular snippets on old GCCs. It ICEs there. --- doc/snippets/MagnumShaders.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/snippets/MagnumShaders.cpp b/doc/snippets/MagnumShaders.cpp index ed5bc1ca2..11b347a99 100644 --- a/doc/snippets/MagnumShaders.cpp +++ b/doc/snippets/MagnumShaders.cpp @@ -43,6 +43,7 @@ using namespace Magnum::Math::Literals; int main() { +#if !defined(__GNUC__) || defined(__clang__) || __GNUC__*100 + __GNUC_MINOR__ >= 500 { /* [shaders-setup] */ struct Vertex { @@ -241,6 +242,7 @@ vertexIndices.setData(vertexIndex, BufferUsage::StaticDraw); mesh.addVertexBuffer(vertexIndices, 0, Shaders::MeshVisualizer::VertexIndex{}); /* [MeshVisualizer-usage-no-geom-old1] */ } +#endif { Mesh mesh; @@ -276,6 +278,7 @@ mesh.addVertexBuffer(vertices, 0, Shaders::MeshVisualizer::Position{}); /* [MeshVisualizer-usage-no-geom] */ } +#if !defined(__GNUC__) || defined(__clang__) || __GNUC__*100 + __GNUC_MINOR__ >= 500 { /* [Phong-usage-colored1] */ struct Vertex { @@ -347,6 +350,7 @@ shader.setTextures(nullptr, &diffuseTexture, &specularTexture) mesh.draw(shader); /* [Phong-usage-texture2] */ } +#endif { Texture2D ambientAlphaTexture, diffuseAlphaTexture; @@ -361,6 +365,7 @@ shader.setTextures(&ambientAlphaTexture, &diffuseAlphaTexture, nullptr) /* [Phong-usage-alpha] */ } +#if !defined(__GNUC__) || defined(__clang__) || __GNUC__*100 + __GNUC_MINOR__ >= 500 { /* [Vector-usage1] */ struct Vertex { @@ -422,5 +427,6 @@ shader.setTransformationProjectionMatrix(projectionMatrix*transformationMatrix); mesh.draw(shader); /* [VertexColor-usage2] */ } +#endif }