- 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();