This commit is contained in:
rachytski 2011-12-07 18:46:53 +04:00 committed by Alex Zolotarev
parent 6f096ed00c
commit 358a248ab3
3 changed files with 12 additions and 0 deletions

View file

@ -292,6 +292,9 @@ namespace yg
void GeometryBatcher::freeTexture(int pipelineID)
{
if (!m_skin->getPage(pipelineID)->texture())
return;
shared_ptr<FreeTexture> freeTexCmd(new FreeTexture());
freeTexCmd->m_texture = m_skin->getPage(pipelineID)->texture();
@ -311,6 +314,9 @@ namespace yg
if (freeTexCmd->m_texture)
processCommand(freeTexCmd);
m_skin->getPage(pipelineID)->resetTexture();
/*
m_skin->getPage(pipelineID)->freeTexture();*/
}

View file

@ -377,6 +377,11 @@ namespace yg
0x00FFFFFF - 1);
}
void SkinPage::resetTexture()
{
m_texture.reset();
}
void SkinPage::freeTexture()
{
if (m_texture)

View file

@ -128,6 +128,7 @@ namespace yg
void reserveTexture() const;
void freeTexture();
void resetTexture();
void createPacker();
uint32_t findColor(Color const & c) const;