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 /** @file
* @brief Class Magnum::Mesh * @brief Class @ref Magnum::Mesh
*/ */
#include <vector> #include <vector>
@ -285,10 +285,10 @@ for more infromation) and call @ref Mesh::draw().
@section Mesh-performance-optimization Performance optimizations @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 @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 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 unnecessary calls to @fn_gl{BindVertexArray}. %Mesh limits and
implementation-defined values (such as @ref maxVertexAttributes()) are cached, implementation-defined values (such as @ref maxVertexAttributes()) are cached,
so repeated queries don't result in repeated @fn_gl{Get} calls. 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 * @brief OpenGL mesh ID
* *
* If @extension{APPLE,vertex_array_object} is not available, returns * If @extension{APPLE,vertex_array_object} (part of OpenGL 3.0) is not
* `0`. * available, returns `0`.
*/ */
GLuint id() const { return _id; } 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) * Prefer to use @ref setIndexBuffer(Buffer&, GLintptr, IndexType, UnsignedInt, UnsignedInt)
* for better performance. * for better performance.
* @see setIndexCount(), MeshTools::compressIndices(), * @see @ref setIndexCount(), @ref MeshTools::compressIndices(),
* @fn_gl{BindVertexArray}, @fn_gl{BindBuffer} (if * @fn_gl{BindVertexArray}, @fn_gl{BindBuffer} (if
* @extension{APPLE,vertex_array_object} is available) * @extension{APPLE,vertex_array_object} is available)
*/ */

10
src/MeshView.h

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

Loading…
Cancel
Save