Browse Source

Updated documentation of mesh classes.

pull/51/head
Vladimír Vondruš 13 years ago
parent
commit
5e5b5e9c4c
  1. 12
      src/Mesh.h
  2. 10
      src/MeshView.h

12
src/Mesh.h

@ -25,7 +25,7 @@
*/
/** @file
* @brief Class Magnum::Mesh
* @brief Class @ref Magnum::Mesh
*/
#include <vector>
@ -285,10 +285,10 @@ for more infromation) and call @ref Mesh::draw().
@section Mesh-performance-optimization Performance optimizations
If @extension{APPLE,vertex_array_object}, OpenGL ES 3.0 or
If @extension{APPLE,vertex_array_object} (part of OpenGL 3.0), OpenGL ES 3.0 or
@es_extension{OES,vertex_array_object} on OpenGL ES 2.0 is supported, VAOs are
used instead of binding the buffers and specifying vertex attribute pointers
in each draw() call. The engine tracks currently bound VAO to avoid
in each @ref draw() call. The engine tracks currently bound VAO to avoid
unnecessary calls to @fn_gl{BindVertexArray}. %Mesh limits and
implementation-defined values (such as @ref maxVertexAttributes()) are cached,
so repeated queries don't result in repeated @fn_gl{Get} calls.
@ -410,8 +410,8 @@ class MAGNUM_EXPORT Mesh: public AbstractObject {
/**
* @brief OpenGL mesh ID
*
* If @extension{APPLE,vertex_array_object} is not available, returns
* `0`.
* If @extension{APPLE,vertex_array_object} (part of OpenGL 3.0) is not
* available, returns `0`.
*/
GLuint id() const { return _id; }
@ -590,7 +590,7 @@ class MAGNUM_EXPORT Mesh: public AbstractObject {
*
* Prefer to use @ref setIndexBuffer(Buffer&, GLintptr, IndexType, UnsignedInt, UnsignedInt)
* for better performance.
* @see setIndexCount(), MeshTools::compressIndices(),
* @see @ref setIndexCount(), @ref MeshTools::compressIndices(),
* @fn_gl{BindVertexArray}, @fn_gl{BindBuffer} (if
* @extension{APPLE,vertex_array_object} is available)
*/

10
src/MeshView.h

@ -25,7 +25,7 @@
*/
/** @file
* @brief Class Magnum::MeshView
* @brief Class @ref Magnum::MeshView
*/
#include "Magnum.h"
@ -42,10 +42,10 @@ index count and offset. It is then possible to reuse one mesh buffer
configuration for different views. %Mesh primitive, index type, attribute
bindings and attached buffers are reused from original mesh.
The same rules as in Mesh apply, i.e. if the view has non-zero index count, it
is treated as indexed mesh, otherwise it is treated as non-indexed mesh. If
both index and vertex count is zero, the view is treated as empty and no draw
commands are issued when calling draw().
The same rules as in @ref Mesh apply, i.e. if the view has non-zero index
count, it is treated as indexed mesh, otherwise it is treated as non-indexed
mesh. If both index and vertex count is zero, the view is treated as empty and
no draw commands are issued when calling @ref draw().
You must ensure that the original mesh remains available for whole view
lifetime.

Loading…
Cancel
Save