]> git.tdb.fi Git - libs/gl.git/blobdiff - source/mesh.cpp
Complete rewrite of extension handling
[libs/gl.git] / source / mesh.cpp
index 67f9698cfa36468d5fb6955f49b5ce5774b95e0f..9757df5cc9e20f364ff96880f115b1707a1f8f5e 100644 (file)
@@ -1,13 +1,6 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007-2011  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #include "buffer.h"
-#include "extension.h"
 #include "mesh.h"
+#include "nv_primitive_restart.h"
 #include "renderer.h"
 
 using namespace std;
@@ -76,7 +69,7 @@ void Mesh::add_batch(const Batch &b)
                PrimitiveType type = b.get_type();
                can_append = (type==batches.back().get_type() &&
                        type!=LINE_STRIP && type!=LINE_LOOP && type!=POLYGON &&
-                       (type!=TRIANGLE_FAN || is_supported("GL_NV_primitive_restart")));
+                       (type!=TRIANGLE_FAN || NV_primitive_restart));
        }
 
        if(defer_ibuf)
@@ -124,6 +117,8 @@ void Mesh::draw(Renderer &renderer) const
 
        for(list<Batch>::const_iterator i=batches.begin(); i!=batches.end(); ++i)
                renderer.draw(*i);
+
+       renderer.set_winding_test(0);
 }