diff options
author | Stijn Buys <ingar@osirion.org> | 2009-08-18 09:24:15 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-08-18 09:24:15 +0000 |
commit | f030154fe727e25a2afe1f78b3998c2d2dba95e4 (patch) | |
tree | cd92baf9e4fa8a136523b9eb570e9811846c9250 /src/model/vertexarray.h | |
parent | 5636fad174f0bcff857c357c394c4cc8d424b302 (diff) |
astyle cleanup, corrects not loading of material textures
Diffstat (limited to 'src/model/vertexarray.h')
-rw-r--r-- | src/model/vertexarray.h | 47 |
1 files changed, 20 insertions, 27 deletions
diff --git a/src/model/vertexarray.h b/src/model/vertexarray.h index 4277442..4377f67 100644 --- a/src/model/vertexarray.h +++ b/src/model/vertexarray.h @@ -24,61 +24,54 @@ public: /// create a new VertexArray with size in Mb VertexArray(size_t size); ~VertexArray(); - + void clear(); - - size_t add_vertex(math::Vector3f const &v, math::Vector3f const &n, float tex_x=0.0f, float tex_y=0.0f); - - inline float *vertex() - { + + size_t add_vertex(math::Vector3f const &v, math::Vector3f const &n, float tex_x = 0.0f, float tex_y = 0.0f); + + inline float *vertex() { return vertex_vertex; } - inline float *normal() - { + inline float *normal() { return vertex_normal; } - inline float *texture() - { + inline float *texture() { return vertex_texture; } - - inline bool overflow() const - { + + inline bool overflow() const { return vertex_overflow; } - + /// size of the vertex array in number of floats (for a single array) - inline size_t size() const - { + inline size_t size() const { return vertex_size; } - + /// number of allocated floats - inline size_t index() const - { + inline size_t index() const { return vertex_index; } - - static inline VertexArray *instance() - { + + static inline VertexArray *instance() { return vertex_instance; } - + private: /// model vertices float *vertex_vertex; float *vertex_normal; float *vertex_texture; - + size_t vertex_index; size_t vertex_size; - + void add_sphere(); - + static VertexArray *vertex_instance; - + bool vertex_overflow; }; |