X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FObjects.cpp;h=8f2544f905df5a3666839c95130deaf479d75263;hb=55148f29742cb999593129d751df08b275ba0198;hp=353fa6e31f74b8d88215b2aa40928466b447bd74;hpb=9e06cb73424ca3f0eb971350c5dfb3cdaec0d5bf;p=lugaru.git diff --git a/Source/Objects.cpp b/Source/Objects.cpp index 353fa6e..8f2544f 100644 --- a/Source/Objects.cpp +++ b/Source/Objects.cpp @@ -759,10 +759,6 @@ Objects::Objects() center = 0; radius = 0; numobjects = 0; - boxtextureptr = 0; - treetextureptr = 0; - bushtextureptr = 0; - rocktextureptr = 0; memset(position, 0, sizeof(position)); memset(type, 0, sizeof(type)); @@ -787,9 +783,9 @@ Objects::Objects() 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(); };