Browse Source

Doc++

pull/54/head
Vladimír Vondruš 12 years ago
parent
commit
7d0726e5a5
  1. 16
      src/Magnum/Mesh.h
  2. 2
      src/Magnum/MeshTools/Interleave.h
  3. 5
      src/Magnum/MeshView.h

16
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)
*/

2
src/Magnum/MeshTools/Interleave.h

@ -215,8 +215,8 @@ template<class ...T> 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<class T> CORRADE_DEPRECATED("Use interleave(const T&...) instead") typename std::enable_if<!std::is_convertible<T, std::size_t>::value, void>::type interleave(Mesh& mesh, Buffer& buffer, BufferUsage usage, const T& attribute) {

5
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;

Loading…
Cancel
Save