fixed re-initialization of textures after change of renderer
[rocksndiamonds.git] / src / init.c
index ca5d16b6be699cbf992e0d0983b8297456ef53b4..375bf6a3174e2c25204b7c95a3ceabe41a615d28 100644 (file)
@@ -230,6 +230,8 @@ void InitImageTextures()
 {
   int i, j, k;
 
+  FreeAllImageTextures();
+
   for (i = 0; i < NUM_GLOBAL_ANIMS; i++)
   {
     for (j = 0; j < NUM_GLOBAL_ANIM_PARTS_ALL; j++)
@@ -241,8 +243,7 @@ void InitImageTextures()
        if (graphic == IMG_UNDEFINED)
          continue;
 
-       // (re)create textures from images for fast GPU blitting, if possible
-       ReCreateImageTextures(graphic);
+       CreateImageTextures(graphic);
       }
     }
   }