X-Git-Url: http://git.mutantstargoat.com?a=blobdiff_plain;f=src%2Fmeshgen.cc;h=ddcd5715cc5ba8a73d77e0da3f564e6b2ba0f9ff;hb=fd601d4218b63fdf92c5e4dfa32eac8adbda82fa;hp=ff7906d4a251803ebecdac612452ec3d6f1fcadc;hpb=197f20b5d4db937029f7b585be23ee7fe5da66dc;p=demo diff --git a/src/meshgen.cc b/src/meshgen.cc index ff7906d..ddcd571 100644 --- a/src/meshgen.cc +++ b/src/meshgen.cc @@ -119,7 +119,7 @@ void gen_geosphere(Mesh *mesh, float rad, int subdiv, bool hemi) for(int i=0; iindices[i] = i; } - mesh->update_vertex_data(); + mesh->invalidate(); } // ------ heightfield ------ @@ -165,9 +165,9 @@ void gen_heightfield(Mesh *mesh, float xsz, float ysz, float height, int usub, float dv = 1.0 / (float)num_vvertices; for(int i=0; ivertices[vidx] = vtx; mesh->normals[vidx] = normal; @@ -202,7 +202,6 @@ void gen_heightfield(Mesh *mesh, float xsz, float ysz, float height, int usub, int c = d + 1; /* 1st triangle */ - *iptr++ = a; *iptr++ = b; *iptr++ = c; @@ -214,5 +213,5 @@ void gen_heightfield(Mesh *mesh, float xsz, float ysz, float height, int usub, *iptr++ = a; } } - mesh->update_vertex_data(); + mesh->invalidate(); }