X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fcore%2Fmesh.h;h=2d56193d14a104ccc3d08bb87fd0a11f5f8bbe11;hb=38712d8ecc57d043a2419ffbaeeb57f7a6586f14;hp=57ffce4722e30efce84ff588741d9b845f7d108b;hpb=fe9836f2d8d7abb0480582c544611a5b248310cc;p=libs%2Fgl.git diff --git a/source/core/mesh.h b/source/core/mesh.h index 57ffce47..2d56193d 100644 --- a/source/core/mesh.h +++ b/source/core/mesh.h @@ -1,6 +1,8 @@ #ifndef MSP_GL_MESH_H_ #define MSP_GL_MESH_H_ +#include +#include #include #include "batch.h" #include "cullface.h" @@ -64,20 +66,17 @@ private: VertexArray vertices; std::vector 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(ResourceManager * = 0); - Mesh(const VertexFormat &, ResourceManager * = 0); -private: - void init(ResourceManager *); -public: + Mesh() = default; + Mesh(const VertexFormat &); ~Mesh(); void storage(const VertexFormat &); @@ -91,7 +90,7 @@ public: const VertexSetup &get_vertex_setup() const { return vtx_setup; } const Buffer *get_index_buffer() const { return ibuf; } unsigned get_n_vertices() const; - float *modify_vertex(unsigned); + char *modify_vertex(unsigned); void add_batch(const Batch &b); const std::vector &get_batches() const { return batches; } @@ -107,7 +106,7 @@ private: public: virtual int get_load_priority() const { return 1; } virtual Resource::AsyncLoader *load(IO::Seekable &, const Resources * = 0); - virtual UInt64 get_data_size() const; + virtual std::uint64_t get_data_size() const; virtual void unload(); void set_debug_name(const std::string &);