diff --git a/src/Magnum/Mesh.h b/src/Magnum/Mesh.h index b2bafd179..6ca138de5 100644 --- a/src/Magnum/Mesh.h +++ b/src/Magnum/Mesh.h @@ -503,11 +503,11 @@ class MAGNUM_EXPORT Mesh: public AbstractObject { /** * @brief Set vertex/index count + * @return Reference to self (for method chaining) * * If the mesh is indexed, the value is treated as index count, - * otherwise the value is vertex count. Default is `0`. This value is - * set automatically by @ref MeshTools::interleave() and - * @ref MeshTools::compressIndices() functions. + * otherwise the value is vertex count. If set to `0`, no draw commands + * are issued when calling @ref draw(). Default is `0`. * @see @ref isIndexed() */ Mesh& setCount(Int count) { @@ -520,11 +520,12 @@ class MAGNUM_EXPORT Mesh: public AbstractObject { /** * @brief Set base vertex + * @return Reference to self (for method chaining) * * Sets number of vertices of which the vertex buffer will be offset - * when drawing. - * @requires_gl Desktop OpenGL is required for base vertex - * specification in indexed meshes. + * when drawing. Default is `0`. + * @requires_gl Base vertex cannot be specified for indexed meshes in + * OpenGL ES. */ Mesh& setBaseVertex(Int baseVertex) { _baseVertex = baseVertex; @@ -651,8 +652,7 @@ class MAGNUM_EXPORT Mesh: public AbstractObject { * @ref setIndexBuffer(Buffer&, GLintptr, IndexType), as this * functionality is not available there. * @see @ref maxElementsIndices(), @ref maxElementsVertices(), - * @ref setCount(), @ref isIndexed(), - * @ref MeshTools::compressIndices(), @fn_gl{BindVertexArray}, + * @ref setCount(), @ref isIndexed(), @fn_gl{BindVertexArray}, * @fn_gl{BindBuffer} (if @extension{APPLE,vertex_array_object} is * available) */ diff --git a/src/Magnum/MeshTools/Interleave.h b/src/Magnum/MeshTools/Interleave.h index 5316d5eea..40bb0c963 100644 --- a/src/Magnum/MeshTools/Interleave.h +++ b/src/Magnum/MeshTools/Interleave.h @@ -215,8 +215,8 @@ template CORRADE_DEPRECATED("Use interleave(const T&...) instead") v Simplified specialization of the above function for only one attribute array, equivalent to the following: @code +if(!mesh.isIndexed()) mesh.setCount(attribute.size()); buffer.setData(attribute, usage); -if(!mesh.isIndexed()) mesh.setVertexCount(attribute.size()); @endcode */ template CORRADE_DEPRECATED("Use interleave(const T&...) instead") typename std::enable_if::value, void>::type interleave(Mesh& mesh, Buffer& buffer, BufferUsage usage, const T& attribute) { diff --git a/src/Magnum/MeshView.h b/src/Magnum/MeshView.h index 90cb6b172..25f114866 100644 --- a/src/Magnum/MeshView.h +++ b/src/Magnum/MeshView.h @@ -84,11 +84,12 @@ class MAGNUM_EXPORT MeshView { /** * @brief Set base vertex + * @return Reference to self (for method chaining) * * Sets number of vertices of which the vertex buffer will be offset * when drawing. Default is `0`. - * @requires_gl Desktop OpenGL is required for base vertex - * specification in indexed meshes. + * @requires_gl Base vertex cannot be specified for indexed meshes in + * OpenGL ES. */ MeshView& setBaseVertex(Int baseVertex) { _baseVertex = baseVertex;