From 36ce0900137ffa2959e6934ca56b684edaa78abd Mon Sep 17 00:00:00 2001 From: fallenoak Date: Wed, 22 Oct 2025 01:05:07 -0500 Subject: [PATCH] feat(component): add TextureCacheHasMips --- src/component/Texture.cpp | 5 +++++ src/component/Texture.hpp | 2 ++ 2 files changed, 7 insertions(+) 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