]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/mesh.cpp
Fix the type of a location variable
[libs/gl.git] / source / core / mesh.cpp
index 029c16e0fac6b04d35f1847faf2590fafd320c1f..e2dd853c448dff6c25259bcb42aa46d6a1433c70 100644 (file)
@@ -9,29 +9,11 @@ using namespace std;
 namespace Msp {
 namespace GL {
 
-Mesh::Mesh(ResourceManager *rm)
+Mesh::Mesh(const VertexFormat &f)
 {
-       init(rm);
-}
-
-Mesh::Mesh(const VertexFormat &f, ResourceManager *rm)
-{
-       init(rm);
        storage(f);
 }
 
-void Mesh::init(ResourceManager *rm)
-{
-       vbuf = 0;
-       ibuf = 0;
-       dirty = 0;
-       disallow_rendering = false;
-       face_winding = NON_MANIFOLD;
-
-       if(rm)
-               set_manager(rm);
-}
-
 Mesh::~Mesh()
 {
        set_manager(0);
@@ -97,12 +79,12 @@ void Mesh::check_buffers(unsigned mask)
        }
 }
 
-unsigned Mesh::get_n_vertices() const
+size_t Mesh::get_n_vertices() const
 {
        return vertices.size();
 }
 
-char *Mesh::modify_vertex(unsigned i)
+char *Mesh::modify_vertex(size_t i)
 {
        if(vertices.get_format().empty())
                throw invalid_operation("Mesh::modify_vertex");