update gradle project, parallel for-loop based on std::thread on android, fix mipmaps on TextureManager
This commit is contained in:
@@ -9,13 +9,14 @@ std::map<uint16_t, Texture2D> TextureManager::m_textures;
|
||||
bool TextureManager::load(const char* path, bool generate_mipmaps)
|
||||
{
|
||||
uint16_t id = const_hash(path);
|
||||
if (m_textures.count(id) == 0 || !m_textures[id].ready())
|
||||
auto t = m_textures.find(id);
|
||||
if (t == m_textures.end() || !m_textures[id].ready())
|
||||
{
|
||||
if (!m_textures[id].load(path))
|
||||
return false;
|
||||
if (generate_mipmaps)
|
||||
m_textures[id].create_mipmaps();
|
||||
}
|
||||
if (generate_mipmaps && !m_textures[id].has_mips)
|
||||
m_textures[id].create_mipmaps();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user