Browse Source

Added implicit constructors for Mesh and IndexedMesh.

pull/279/head
Vladimír Vondruš 15 years ago
parent
commit
8099511d12
  1. 10
      src/IndexedMesh.h
  2. 9
      src/Mesh.h

10
src/IndexedMesh.h

@ -29,6 +29,16 @@ namespace Magnum {
*/
class IndexedMesh: public Mesh {
public:
/**
* @brief Implicit constructor
*
* Allows creating the object without knowing anything about mesh data.
* Note that you have to call setPrimitive(), setVertexCount(),
* setIndexCount() and setIndexType() manually for mesh to draw
* properly.
*/
inline IndexedMesh(): _indexBuffer(Buffer::ElementArrayBuffer), _indexCount(0), _indexType(GL_UNSIGNED_SHORT) {}
/**
* @brief Constructor
* @param primitive Primitive type

9
src/Mesh.h

@ -81,6 +81,15 @@ class Mesh {
TriangleFan = GL_TRIANGLE_FAN
};
/**
* @brief Implicit constructor
*
* Allows creating the object without knowing anything about mesh data.
* Note that you have to call setPrimitive() and setVertexCount()
* manually for mesh to draw properly.
*/
inline Mesh(): _primitive(Triangles), _vertexCount(0), finalized(false) {}
/**
* @brief Constructor
* @param primitive Primitive type

Loading…
Cancel
Save