Browse Source

Performance increase in GeoMipTerrain

rdb 15 years ago
parent
commit
81d8d44989
1 changed files with 1 additions and 0 deletions
  1. 1 0
      panda/src/grutil/geoMipTerrain.cxx

+ 1 - 0
panda/src/grutil/geoMipTerrain.cxx

@@ -70,6 +70,7 @@ generate_block(unsigned short mx,
   // Create vertex data and writers
   // Create vertex data and writers
   PT(GeomVertexData) vdata = new GeomVertexData(_root.get_name(),
   PT(GeomVertexData) vdata = new GeomVertexData(_root.get_name(),
                    GeomVertexFormat::register_format(format), Geom::UH_stream);
                    GeomVertexFormat::register_format(format), Geom::UH_stream);
+  vdata->set_num_rows((_block_size + 1) * (_block_size + 1));
   GeomVertexWriter cwriter;
   GeomVertexWriter cwriter;
   if (_has_color_map) {
   if (_has_color_map) {
     cwriter=GeomVertexWriter(vdata, "color"  );
     cwriter=GeomVertexWriter(vdata, "color"  );