本文整理汇总了C++中CTextureMap::IsEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ CTextureMap::IsEmpty方法的具体用法?C++ CTextureMap::IsEmpty怎么用?C++ CTextureMap::IsEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTextureMap
的用法示例。
在下文中一共展示了CTextureMap::IsEmpty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Flush
void CGUITextureManager::Flush()
{
CSingleLock lock(g_graphicsContext);
ivecTextures i;
i = m_vecTextures.begin();
while (i != m_vecTextures.end())
{
CTextureMap* pMap = *i;
pMap->Flush();
if (pMap->IsEmpty() )
{
delete pMap;
i = m_vecTextures.erase(i);
}
else
{
++i;
}
}
}
示例2: Flush
void CGUITextureManager::Flush()
{
CSingleLock lock(CServiceBroker::GetWinSystem()->GetGfxContext());
ivecTextures i;
i = m_vecTextures.begin();
while (i != m_vecTextures.end())
{
CTextureMap* pMap = *i;
pMap->Flush();
if (pMap->IsEmpty() )
{
delete pMap;
i = m_vecTextures.erase(i);
}
else
{
++i;
}
}
}
示例3: ReleaseTexture
void CGUITextureManager::ReleaseTexture(const CStdString& strTextureName, int iPicture)
{
CSingleLock lock(g_graphicsContext);
#ifndef _LINUX
MEMORYSTATUS stat;
GlobalMemoryStatus(&stat);
DWORD dwMegFree = stat.dwAvailPhys / (1024 * 1024);
if (dwMegFree > 29)
{
// dont release skin textures, they are reloaded each time
//if (strTextureName.GetAt(1) != ':') return;
//CLog::Log(LOGINFO, "release:%s", strTextureName.c_str());
}
#endif
ivecTextures i;
i = m_vecTextures.begin();
while (i != m_vecTextures.end())
{
CTextureMap* pMap = *i;
if (pMap->GetName() == strTextureName)
{
pMap->Release(iPicture);
if (pMap->IsEmpty() )
{
//CLog::Log(LOGINFO, " cleanup:%s", strTextureName.c_str());
delete pMap;
i = m_vecTextures.erase(i);
}
return;
}
++i;
}
CLog::Log(LOGWARNING, "%s: Unable to release texture %s", __FUNCTION__, strTextureName.c_str());
}