Skip to content

Commit

Permalink
Make sure use count starts at 1 (#4356)
Browse files Browse the repository at this point in the history
  • Loading branch information
errissa committed Nov 30, 2021
1 parent a3d38ea commit ecafe65
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ TextureHandle FilamentResourceManager::CreateTexture(
auto texture = LoadTextureFromImage(img, srgb);

handle = RegisterResource<TextureHandle>(engine_, texture, textures_);
textures_[handle].use_count++;
texture_cache_[hash] = handle;
}

Expand All @@ -484,6 +485,7 @@ TextureHandle FilamentResourceManager::CreateTexture(
auto texture = LoadTextureFromImage(copy, srgb);

handle = RegisterResource<TextureHandle>(engine_, texture, textures_);
textures_[handle].use_count++;
texture_cache_[hash] = handle;
}

Expand Down

0 comments on commit ecafe65

Please sign in to comment.