diff --git a/src/component/Texture.cpp b/src/component/Texture.cpp index d079592..888126c 100644 --- a/src/component/Texture.cpp +++ b/src/component/Texture.cpp @@ -163,3 +163,8 @@ int32_t TextureCacheGetInfo(void* handle, TCTEXTUREINFO& info, int32_t force) { return 1; } + +int32_t TextureCacheHasMips(void* handle) { + auto entry = static_cast(handle); + return entry && entry->m_data && !entry->IsMissing(); +} diff --git a/src/component/Texture.hpp b/src/component/Texture.hpp index 7306e05..ca1aa31 100644 --- a/src/component/Texture.hpp +++ b/src/component/Texture.hpp @@ -44,4 +44,6 @@ void TextureCacheDestroyTexture(void* texture); int32_t TextureCacheGetInfo(void* handle, TCTEXTUREINFO& info, int32_t a3); +int32_t TextureCacheHasMips(void* handle); + #endif