From aaaae14884eefe5571b5c5d6ce1606085e0b9376 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 20 Jul 2008 13:50:24 +0000 Subject: handle vertexarray overflows more gracefull --- src/model/vertexarray.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/model/vertexarray.h') 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; }; } -- cgit v1.2.3