GRIM: Initialize all members of Mesh.

This commit is contained in:
Einar Johan Trøan Sømåen 2013-04-21 15:39:39 +02:00
parent 4cd33f9453
commit 8bada3d4dd
2 changed files with 19 additions and 1 deletions

View File

@ -396,6 +396,24 @@ void MeshFace::draw(float *vertices, float *vertNormals, float *textureVerts) co
/**
* @class Mesh
*/
Mesh::Mesh() : _numFaces(0),
_name(""),
_radius(0.0f),
_shadow(0),
_geometryMode(0),
_lightingMode(0),
_textureMode(0),
_numVertices(0),
_materialid(NULL),
_vertices(NULL),
_verticesI(NULL),
_vertNormals(NULL),
_numTextureVerts(0),
_textureVerts(NULL) {
}
Mesh::~Mesh() {
delete[] _vertices;
delete[] _verticesI;

View File

@ -122,7 +122,7 @@ public:
void draw() const;
void getBoundingBox(int *x1, int *y1, int *x2, int *y2) const;
void update();
Mesh() : _numFaces(0) { }
Mesh();
~Mesh();
char _name[32];