diff options
author | Stijn Buys <ingar@osirion.org> | 2010-10-24 16:02:09 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-10-24 16:02:09 +0000 |
commit | a704318f507f486ac04834747eb209d0a9410702 (patch) | |
tree | b6f3f6df4b285be0b9c6e91c0486271daf0bb6ee /src/model/vertexarray.h | |
parent | c2a6f7c2ee6245109c897ee23b093b5277a30594 (diff) |
keepalive optimizations, r_lights engine variable, OpenGL VBO support
Diffstat (limited to 'src/model/vertexarray.h')
-rw-r--r-- | src/model/vertexarray.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/model/vertexarray.h b/src/model/vertexarray.h index 2e43f2a..9a71811 100644 --- a/src/model/vertexarray.h +++ b/src/model/vertexarray.h @@ -38,6 +38,11 @@ public: return vertex_overflow; } + /// return true if the vertex data has changed and needs to uploaded to video memory + inline bool dirty() const { + return vertex_dirty; + } + /// pointer to model vertices, sequential in GL_T2F_N3F_V3F format inline const float *ptr() const { return vertex_data; @@ -52,6 +57,10 @@ public: inline size_t index() const { return vertex_index; } + + inline void set_dirty(const bool dirty = true) { + vertex_dirty = dirty; + } static inline VertexArray *instance() { return vertex_instance; @@ -69,6 +78,8 @@ private: static VertexArray *vertex_instance; bool vertex_overflow; + + bool vertex_dirty; }; } |