Browse Source

gobj: Fixed wrong texture pool key for 2D texture arrays

        - 2D texture arrays are added to internal storage with
        specific unique name, so keep it as texture pool key
        instead of filename.
deflected 9 years ago
parent
commit
abb6ee0542
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/gobj/texturePool.cxx

+ 1 - 1
panda/src/gobj/texturePool.cxx

@@ -772,7 +772,7 @@ ns_load_cube_map(const Filename &filename_pattern, bool read_mipmaps,
   nassertr(tex != (Texture *)NULL, NULL);
   nassertr(tex != (Texture *)NULL, NULL);
   tex->set_filename(filename_pattern);
   tex->set_filename(filename_pattern);
   tex->set_fullpath(filename);
   tex->set_fullpath(filename);
-  tex->_texture_pool_key = filename;
+  tex->_texture_pool_key = unique_filename;
 
 
   {
   {
     MutexHolder holder(_lock);
     MutexHolder holder(_lock);