From 0d4bf16deb4ac78464696dfcb43684549d144f44 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 16 Nov 2001 14:04:06 +0000 Subject: [PATCH] support new PTA::empty_array syntax --- pandaapp/src/stitchviewer/triangleMesh.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pandaapp/src/stitchviewer/triangleMesh.cxx b/pandaapp/src/stitchviewer/triangleMesh.cxx index 80ba0f6e7a..41a8556cc7 100644 --- a/pandaapp/src/stitchviewer/triangleMesh.cxx +++ b/pandaapp/src/stitchviewer/triangleMesh.cxx @@ -22,7 +22,10 @@ TriangleMesh:: TriangleMesh(int x_verts, int y_verts) : - _coords(0), _norms(0), _colors(0), _texcoords(0), + _coords(PTA_Vertexf::empty_array(0)), + _norms(PTA_Normalf::empty_array(0)), + _colors(PTA_Colorf::empty_array(0)), + _texcoords(PTA_TexCoordf::empty_array(0)), _x_verts(x_verts), _y_verts(y_verts) { @@ -49,8 +52,8 @@ build_mesh() const { int num_tstrips = (_y_verts-1); int tstrip_length = 2*(_x_verts-1)+2; - PTA(int) lengths(num_tstrips); - PTA(ushort) vindex(num_tstrips * tstrip_length); + PTA_int lengths = PTA_int::empty_array(num_tstrips); + PTA_ushort vindex = PTA_ushort::empty_array(num_tstrips * tstrip_length); // Set the lengths array. We are creating num_tstrips T-strips, // each of which has t_strip length vertices.