- if(terraintexture)glDeleteTextures( 1, &terraintexture );
- if(shadowtexture) glDeleteTextures( 1, &shadowtexture );
- if(bodyprinttexture) glDeleteTextures( 1, &bodyprinttexture );
- if(footprinttexture) glDeleteTextures( 1, &footprinttexture );
- if(bloodtexture) glDeleteTextures( 1, &bloodtexture );
- if(bloodtexture2) glDeleteTextures( 1, &bloodtexture2 );
- if(breaktexture) glDeleteTextures( 1, &breaktexture );
+ terraintexture.destroy();
+ shadowtexture.destroy();
+ bodyprinttexture.destroy();
+ footprinttexture.destroy();
+ bloodtexture.destroy();
+ bloodtexture2.destroy();
+ breaktexture.destroy();