X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fmesh.h;h=39bf55b22d5129f0725f11a44233f48be28556d9;hb=f19366d32cc29287a2730cfba90893e407754081;hp=66516267554447968a10912bbc47cdcda9b816de;hpb=d40673bd28c4b4524d3642b949d9d109dc6f9f24;p=libs%2Fgl.git diff --git a/source/core/mesh.h b/source/core/mesh.h index 66516267..39bf55b2 100644 --- a/source/core/mesh.h +++ b/source/core/mesh.h @@ -1,12 +1,14 @@ #ifndef MSP_GL_MESH_H_ #define MSP_GL_MESH_H_ +#include +#include #include #include "batch.h" +#include "cullface.h" #include "resource.h" #include "vertexarray.h" #include "vertexsetup.h" -#include "windingtest.h" namespace Msp { namespace GL { @@ -36,7 +38,6 @@ public: void vertices(); void vertices_with_format(const std::vector &); void batch(PrimitiveType); - void winding(FaceWinding); }; private: @@ -70,15 +71,12 @@ private: VertexSetup vtx_setup; mutable unsigned short dirty; bool disallow_rendering; - const WindingTest *winding; + FaceWinding face_winding; std::string debug_name; public: Mesh(ResourceManager * = 0); Mesh(const VertexFormat &, ResourceManager * = 0); -private: - void init(ResourceManager *); -public: ~Mesh(); void storage(const VertexFormat &); @@ -92,12 +90,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; @@ -108,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 &);