PyBullet: free cached textures

PyBullet: bool PhysicsServerCommandProcessor::pickBody, disable collision filtering to allow picking of all objects
This commit is contained in:
erwincoumans
2018-01-15 08:36:08 -08:00
parent 387d3f16db
commit 9d405fde67
2 changed files with 39 additions and 2 deletions

View File

@@ -30,6 +30,27 @@ struct CachedTextureResult
};
static b3HashMap<b3HashString, CachedTextureResult> gCachedTextureResults;
struct CachedTextureManager
{
CachedTextureManager()
{
}
virtual ~CachedTextureManager()
{
for (int i=0;i<gCachedTextureResults.size();i++)
{
CachedTextureResult* res = gCachedTextureResults.getAtIndex(i);
if (res)
{
free(res->m_pixels);
}
}
}
};
static CachedTextureManager sTexCacheMgr;
bool b3ImportMeshUtility::loadAndRegisterMeshFromFileInternal(const std::string& fileName, b3ImportMeshData& meshData)
{