diff options
author | Stijn Buys <ingar@osirion.org> | 2008-07-20 13:50:24 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-07-20 13:50:24 +0000 |
commit | aaaae14884eefe5571b5c5d6ce1606085e0b9376 (patch) | |
tree | 1a35d43e22497dd233afbcb5a67456e914005b64 /src/model/vertexarray.h | |
parent | c3d90b226bdd83592d08704aa918f155f4c757e2 (diff) |
handle vertexarray overflows more gracefull
Diffstat (limited to 'src/model/vertexarray.h')
-rw-r--r-- | src/model/vertexarray.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/model/vertexarray.h b/src/model/vertexarray.h index 6ff32bc..26d2514 100644 --- a/src/model/vertexarray.h +++ b/src/model/vertexarray.h @@ -24,14 +24,16 @@ public: void clear(); - void add_vertex(math::Vector3f const &v, math::Vector3f const &n, math::Color const &color); - void add_vertex(math::Vector3f const &v, math::Vector3f const &n, math::Color const &color, math::Vector3f const &tex); + size_t add_vertex(math::Vector3f const &v, math::Vector3f const &n, math::Color const &color); + size_t add_vertex(math::Vector3f const &v, math::Vector3f const &n, math::Color const &color, math::Vector3f const &tex); inline float *vertex() { return vertex_vertex; } inline float *color() { return vertex_color; } inline float *normal() { return vertex_normal; } inline float *texture() { return vertex_texture; } + inline bool overflow() const { return vertex_overflow; } + inline size_t size() const { return vertex_size; } inline size_t index() const { return vertex_index; } @@ -50,6 +52,8 @@ private: void add_sphere(); static VertexArray *vertex_instance; + + bool vertex_overflow; }; } |