mirror of https://github.com/skeeto/pixelcity.git
Killed the last of the memory leaks, and included a change to Entity.h, which should have been with PREVIOUS memory-leak plugs.
This commit is contained in:
parent
94871004c0
commit
2436ad8d61
3
Entity.h
3
Entity.h
|
@ -15,13 +15,14 @@ protected:
|
|||
|
||||
public:
|
||||
CEntity (void);
|
||||
GLvector Center () { return _center; }
|
||||
virtual ~CEntity () {};
|
||||
virtual void Render (void);
|
||||
virtual void RenderFlat (bool wirefame);
|
||||
virtual unsigned Texture () { return 0; }
|
||||
virtual void Update (void);
|
||||
virtual bool Alpha () { return false; }
|
||||
virtual int PolyCount () { return 0; }
|
||||
GLvector Center () { return _center; }
|
||||
|
||||
};
|
||||
|
||||
|
|
6
Mesh.cpp
6
Mesh.cpp
|
@ -43,8 +43,12 @@ CMesh::CMesh ()
|
|||
CMesh::~CMesh ()
|
||||
{
|
||||
|
||||
if (_list)
|
||||
glDeleteLists (_list, 1);
|
||||
_vertex.clear ();
|
||||
_fan.clear ();
|
||||
_quad_strip.clear ();
|
||||
_cube.clear ();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
3
Mesh.h
3
Mesh.h
|
@ -24,14 +24,11 @@ public:
|
|||
unsigned _list;
|
||||
int _polycount;
|
||||
std::vector<GLvertex> _vertex;
|
||||
std::vector<GLvector> _normal;
|
||||
std::vector<GLtriangle> _triangle;
|
||||
std::vector<cube> _cube;
|
||||
std::vector<quad_strip> _quad_strip;
|
||||
std::vector<fan> _fan;
|
||||
bool _compiled;
|
||||
|
||||
void NormalAdd (const GLvector& n);
|
||||
void VertexAdd (const GLvertex& v);
|
||||
int VertexCount () { return _vertex.size(); }
|
||||
int PolyCount () { return _polycount; }
|
||||
|
|
Loading…
Reference in New Issue