From 103b2b0c9576331ef2484a5da8f6f3c58184f0ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 3 May 2013 20:44:10 +0200 Subject: [PATCH] Added missing primitive types to Mesh debug and configuration output. --- src/Mesh.cpp | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/src/Mesh.cpp b/src/Mesh.cpp index 475f869f1..995552711 100644 --- a/src/Mesh.cpp +++ b/src/Mesh.cpp @@ -343,12 +343,21 @@ Debug operator<<(Debug debug, Mesh::Primitive value) { switch(value) { #define _c(value) case Mesh::Primitive::value: return debug << "Mesh::Primitive::" #value; _c(Points) - _c(Lines) _c(LineStrip) _c(LineLoop) - _c(Triangles) + _c(Lines) + #ifndef MAGNUM_TARGET_GLES + _c(LineStripAdjacency) + _c(LinesAdjacency) + #endif _c(TriangleStrip) _c(TriangleFan) + _c(Triangles) + #ifndef MAGNUM_TARGET_GLES + _c(TriangleStripAdjacency) + _c(TrianglesAdjacency) + _c(Patches) + #endif #undef _c } @@ -376,12 +385,21 @@ std::string ConfigurationValue::toString(Magnum::Mesh:: switch(value) { #define _c(value) case Magnum::Mesh::Primitive::value: return #value; _c(Points) - _c(Lines) _c(LineStrip) _c(LineLoop) - _c(Triangles) + _c(Lines) + #ifndef MAGNUM_TARGET_GLES + _c(LineStripAdjacency) + _c(LinesAdjacency) + #endif _c(TriangleStrip) _c(TriangleFan) + _c(Triangles) + #ifndef MAGNUM_TARGET_GLES + _c(TriangleStripAdjacency) + _c(TrianglesAdjacency) + _c(Patches) + #endif #undef _c } @@ -390,12 +408,21 @@ std::string ConfigurationValue::toString(Magnum::Mesh:: Magnum::Mesh::Primitive ConfigurationValue::fromString(const std::string& stringValue, ConfigurationValueFlags) { #define _c(value) if(stringValue == #value) return Magnum::Mesh::Primitive::value; - _c(Lines) _c(LineStrip) _c(LineLoop) - _c(Triangles) + _c(Lines) + #ifndef MAGNUM_TARGET_GLES + _c(LineStripAdjacency) + _c(LinesAdjacency) + #endif _c(TriangleStrip) _c(TriangleFan) + _c(Triangles) + #ifndef MAGNUM_TARGET_GLES + _c(TriangleStripAdjacency) + _c(TrianglesAdjacency) + _c(Patches) + #endif #undef _c return Magnum::Mesh::Primitive::Points;