diff --git a/src/Magnum/Primitives/Implementation/Spheroid.cpp b/src/Magnum/Primitives/Implementation/Spheroid.cpp index 22126fbc35..aef2004932 100644 --- a/src/Magnum/Primitives/Implementation/Spheroid.cpp +++ b/src/Magnum/Primitives/Implementation/Spheroid.cpp @@ -229,17 +229,20 @@ Trade::MeshData Spheroid::finalize() { auto typedVertices = reinterpret_cast(_vertexData.data()); Trade::MeshAttributeData positions{Trade::MeshAttributeName::Position, - Containers::stridedArrayView(_vertexData, &typedVertices[0].position, - size, stride)}; + /* GCC 4.8 needs the arrayView() */ + Containers::stridedArrayView(Containers::arrayView(_vertexData), + &typedVertices[0].position, size, stride)}; Trade::MeshAttributeData normals{Trade::MeshAttributeName::Normal, - Containers::stridedArrayView(_vertexData, &typedVertices[0].normal, - size, stride)}; + /* GCC 4.8 needs the arrayView() */ + Containers::stridedArrayView(Containers::arrayView(_vertexData), + &typedVertices[0].normal, size, stride)}; Containers::Array attributes; if(_textureCoords == TextureCoords::Generate) { Trade::MeshAttributeData textureCoords{Trade::MeshAttributeName::TextureCoordinates, - Containers::stridedArrayView(_vertexData, &typedVertices[0].textureCoords, - size, stride)}; + /* GCC 4.8 needs the arrayView() */ + Containers::stridedArrayView(Containers::arrayView(_vertexData), + &typedVertices[0].textureCoords, size, stride)}; attributes = Containers::Array{Containers::InPlaceInit, {positions, normals, textureCoords}}; } else { attributes = Containers::Array{Containers::InPlaceInit, {positions, normals}}; diff --git a/src/Magnum/Trade/Test/MeshData2DTest.cpp b/src/Magnum/Trade/Test/MeshData2DTest.cpp index 1dba8e6ecc..3d9eda0bb9 100644 --- a/src/Magnum/Trade/Test/MeshData2DTest.cpp +++ b/src/Magnum/Trade/Test/MeshData2DTest.cpp @@ -84,7 +84,9 @@ struct { {{0xff98ab_rgbf, 0xff3366_rgbf}}, &State}}, {"from MeshData", - MeshData{MeshPrimitive::Lines, {}, Indices, MeshIndexData{Indices}, {}, Vertices, { + /* GCC 4.8 needs the explicit MeshData3D conversion otherwise it tries + to use a deleted copy constructor */ + MeshData2D{MeshData{MeshPrimitive::Lines, {}, Indices, MeshIndexData{Indices}, {}, Vertices, { MeshAttributeData{MeshAttributeName::Position, Containers::StridedArrayView1D{Vertices, &Vertices[0].position1, 2, sizeof(Vertex)}}, MeshAttributeData{MeshAttributeName::Position, @@ -97,15 +99,17 @@ struct { Containers::StridedArrayView1D{Vertices, &Vertices[0].textureCoords3, 2, sizeof(Vertex)}}, MeshAttributeData{MeshAttributeName::Color, Containers::StridedArrayView1D{Vertices, &Vertices[0].color, 2, sizeof(Vertex)}}, - }, &State}, - MeshData{MeshPrimitive::Lines, {}, Vertices, { + }, &State}}, + /* GCC 4.8 needs the explicit MeshData3D conversion otherwise it tries + to use a deleted copy constructor */ + MeshData2D{MeshData{MeshPrimitive::Lines, {}, Vertices, { MeshAttributeData{MeshAttributeName::Position, Containers::StridedArrayView1D{Vertices, &Vertices[0].position1, 2, sizeof(Vertex)}}, MeshAttributeData{MeshAttributeName::TextureCoordinates, Containers::StridedArrayView1D{Vertices, &Vertices[0].textureCoords1, 2, sizeof(Vertex)}}, MeshAttributeData{MeshAttributeName::Color, Containers::StridedArrayView1D{Vertices, &Vertices[0].color, 2, sizeof(Vertex)}}, - }, &State} + }, &State}} } }; CORRADE_IGNORE_DEPRECATED_POP diff --git a/src/Magnum/Trade/Test/MeshData3DTest.cpp b/src/Magnum/Trade/Test/MeshData3DTest.cpp index 6cd447772a..118491709d 100644 --- a/src/Magnum/Trade/Test/MeshData3DTest.cpp +++ b/src/Magnum/Trade/Test/MeshData3DTest.cpp @@ -90,7 +90,9 @@ struct { {{0xff98ab_rgbf, 0xff3366_rgbf}}, &State}}, {"from MeshData", - MeshData{MeshPrimitive::Lines, {}, Indices, MeshIndexData{Indices}, {}, Vertices, { + /* GCC 4.8 needs the explicit MeshData3D conversion otherwise it tries + to use a deleted copy constructor */ + MeshData3D{MeshData{MeshPrimitive::Lines, {}, Indices, MeshIndexData{Indices}, {}, Vertices, { MeshAttributeData{MeshAttributeName::Position, Containers::StridedArrayView1D{Vertices, &Vertices[0].position1, 2, sizeof(Vertex)}}, MeshAttributeData{MeshAttributeName::Position, @@ -105,8 +107,10 @@ struct { Containers::StridedArrayView1D{Vertices, &Vertices[0].textureCoords3, 2, sizeof(Vertex)}}, MeshAttributeData{MeshAttributeName::Color, Containers::StridedArrayView1D{Vertices, &Vertices[0].color, 2, sizeof(Vertex)}}, - }, &State}, - MeshData{MeshPrimitive::Lines, {}, Vertices, { + }, &State}}, + /* GCC 4.8 needs the explicit MeshData3D conversion otherwise it tries + to use a deleted copy constructor */ + MeshData3D{MeshData{MeshPrimitive::Lines, {}, Vertices, { MeshAttributeData{MeshAttributeName::Position, Containers::StridedArrayView1D{Vertices, &Vertices[0].position1, 2, sizeof(Vertex)}}, MeshAttributeData{MeshAttributeName::Normal, @@ -115,7 +119,7 @@ struct { Containers::StridedArrayView1D{Vertices, &Vertices[0].textureCoords1, 2, sizeof(Vertex)}}, MeshAttributeData{MeshAttributeName::Color, Containers::StridedArrayView1D{Vertices, &Vertices[0].color, 2, sizeof(Vertex)}}, - }, &State} + }, &State}} } }; CORRADE_IGNORE_DEPRECATED_POP