X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fmesh.h;h=0cebaa69c28ce92917d796afe4e034e5434c4611;hp=acf2910cb7ea208f3ce2fbab9c74bc182b781928;hb=3a1b9cbe2441ae670a97541dc8ccb0a2860c8302;hpb=fcde8390ad577fe434dcd4b29e0f410d29f867c9 diff --git a/source/core/mesh.h b/source/core/mesh.h index acf2910c..0cebaa69 100644 --- a/source/core/mesh.h +++ b/source/core/mesh.h @@ -3,10 +3,10 @@ #include #include "batch.h" +#include "cullface.h" #include "resource.h" #include "vertexarray.h" #include "vertexsetup.h" -#include "windingtest.h" namespace Msp { namespace GL { @@ -32,9 +32,10 @@ public: public: Loader(Mesh &, bool = true); private: - void vertices(const std::vector &); + void storage(const std::vector &); + void vertices(); + void vertices_with_format(const std::vector &); void batch(PrimitiveType); - void winding(FaceWinding); }; private: @@ -68,7 +69,7 @@ private: VertexSetup vtx_setup; mutable unsigned short dirty; bool disallow_rendering; - const WindingTest *winding; + FaceWinding face_winding; std::string debug_name; public: @@ -79,6 +80,8 @@ private: public: ~Mesh(); + void storage(const VertexFormat &); + void clear(); private: void check_buffers(unsigned); @@ -88,12 +91,12 @@ 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; } - void set_winding(const WindingTest *); + void set_winding(FaceWinding); void draw(Renderer &) const; void draw_instanced(Renderer &, const VertexSetup &, unsigned) const; @@ -104,7 +107,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 &);