From 0383b345d3f905c2c898807162ec2afb745f3a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 8 Aug 2013 13:29:02 +0200 Subject: [PATCH] Added convenience parameterless Mesh::indexType(). --- src/Mesh.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Mesh.h b/src/Mesh.h index 19369e0a5..bae5960c7 100644 --- a/src/Mesh.h +++ b/src/Mesh.h @@ -335,7 +335,11 @@ class MAGNUM_EXPORT Mesh { UnsignedInt = GL_UNSIGNED_INT }; - /** @brief Size of given index type */ + /** + * @brief Size of given index type + * + * @see indexSize() const + */ static std::size_t indexSize(IndexType type); /** @@ -362,6 +366,13 @@ class MAGNUM_EXPORT Mesh { /** @brief Move assignment */ Mesh& operator=(Mesh&& other); + /** + * @brief Index size + * + * @see indexSize(IndexType) + */ + std::size_t indexSize() const { return indexSize(_indexType); } + /** @brief Primitive type */ Primitive primitive() const { return _primitive; }