]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/mesh.h
Use size_t to store sizes of buffers and such
[libs/gl.git] / source / core / mesh.h
index 89f51fdd9e3493aa97bddd3e40409bffeb34f991..14b08a964cd59e2889c853cc8230afaa81a97a34 100644 (file)
@@ -66,16 +66,16 @@ private:
 
        VertexArray vertices;
        std::vector<Batch> batches;
-       Buffer *vbuf;
-       Buffer *ibuf;
+       Buffer *vbuf = 0;
+       Buffer *ibuf = 0;
        VertexSetup vtx_setup;
-       mutable unsigned short dirty;
-       bool disallow_rendering;
-       FaceWinding face_winding;
+       mutable unsigned short dirty = 0;
+       bool disallow_rendering = false;
+       FaceWinding face_winding = NON_MANIFOLD;
        std::string debug_name;
 
 public:
-       Mesh();
+       Mesh() = default;
        Mesh(const VertexFormat &);
        ~Mesh();
 
@@ -89,8 +89,8 @@ public:
        const VertexArray &get_vertices() const { return vertices; }
        const VertexSetup &get_vertex_setup() const { return vtx_setup; }
        const Buffer *get_index_buffer() const { return ibuf; }
-       unsigned get_n_vertices() const;
-       char *modify_vertex(unsigned);
+       std::size_t get_n_vertices() const;
+       char *modify_vertex(std::size_t);
 
        void add_batch(const Batch &b);
        const std::vector<Batch> &get_batches() const { return batches; }