]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/mesh.h
Refactor winding-based culling
[libs/gl.git] / source / core / mesh.h
index 66516267554447968a10912bbc47cdcda9b816de..57ffce4722e30efce84ff588741d9b845f7d108b 100644 (file)
@@ -3,10 +3,10 @@
 
 #include <msp/datafile/objectloader.h>
 #include "batch.h"
+#include "cullface.h"
 #include "resource.h"
 #include "vertexarray.h"
 #include "vertexsetup.h"
-#include "windingtest.h"
 
 namespace Msp {
 namespace GL {
@@ -36,7 +36,6 @@ public:
                void vertices();
                void vertices_with_format(const std::vector<VertexAttribute> &);
                void batch(PrimitiveType);
-               void winding(FaceWinding);
        };
 
 private:
@@ -70,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:
@@ -97,7 +96,7 @@ public:
        void add_batch(const Batch &b);
        const std::vector<Batch> &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;