center = 0;
radius = 0;
numobjects = 0;
- boxtextureptr = 0;
- treetextureptr = 0;
- bushtextureptr = 0;
- rocktextureptr = 0;
memset(position, 0, sizeof(position));
memset(type, 0, sizeof(type));
Objects::~Objects()
{
- if (boxtextureptr) glDeleteTextures( 1, &boxtextureptr );
- if (treetextureptr) glDeleteTextures( 1, &treetextureptr );
- if (bushtextureptr) glDeleteTextures( 1, &bushtextureptr );
- if (rocktextureptr) glDeleteTextures( 1, &rocktextureptr );
+ boxtextureptr.destroy();
+ treetextureptr.destroy();
+ bushtextureptr.destroy();
+ rocktextureptr.destroy();
};