本文整理汇总了C++中CTexture::Release方法的典型用法代码示例。如果您正苦于以下问题:C++ CTexture::Release方法的具体用法?C++ CTexture::Release怎么用?C++ CTexture::Release使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTexture
的用法示例。
在下文中一共展示了CTexture::Release方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Release
bool CTextureMap::Release(int iPicture)
{
if (iPicture < 0 || iPicture >= (int)m_vecTexures.size()) return true;
CTexture* pTexture = m_vecTexures[iPicture];
return pTexture->Release();
}
示例2: CExc
CGUIStaticPicture::CGUIStaticPicture(float _x, float _y, const char *texName, float _sx, float _sy, UINT color)
: CGUIWidget(_x,_y), CGUIEventSupport(availableEvents, numEvents)
{
UINT ssx, ssy;
CTexture *texture = new CTexture;
rect = 0;
bool released = false;
if ( !( texture->CreateFromFile(texName) ) )
{
texture->Release();
throw CExc(eGUI, E_FILE_NOT_FOUND,"CGUIStaticPicture::CGUIStaticPicture> Cannot find texture: %s",texName);
}
try{
texture->GetImageSize(&ssx,&ssy);
if(_sx>0)
ssx=(UINT)_sx;
if(_sy>0)
ssy=(UINT)_sy;
rect = new CBltRect(_x, _y, (float)ssx, (float)ssy, color);
rect->SetTexture(texture);
texture->Release();
released=true;
SetSize((float)ssx,(float)ssy);
SetPos(_x,_y);
throw_going=true;
focusable=false;
MsgAcceptConsume(MsgMouseL);
// MsgSetConsume(MsgNone);
// MsgSetProduce(MsgNone); // preposila elementum pod sebou
AddToTrash();
}catch(CExc)
{
if(!released)
texture->Release();
SAFE_DELETE(rect);
throw;
}
}