2017-01-05 13:25:09 +08:00
|
|
|
Texture::Texture()
|
|
|
|
{
|
|
|
|
pimpl=new impl;
|
|
|
|
}
|
|
|
|
Texture::Texture(const Texture& inc) : Texture()
|
|
|
|
{
|
|
|
|
*pimpl=*(inc.pimpl);
|
|
|
|
}
|
2017-01-07 09:52:56 +08:00
|
|
|
Texture& Texture::operator = (const Texture& inc)
|
|
|
|
{
|
|
|
|
*pimpl=*(inc.pimpl);
|
|
|
|
return *this;
|
|
|
|
}
|
2017-01-07 17:51:09 +08:00
|
|
|
Texture::Texture(Texture&& inc)
|
|
|
|
{
|
|
|
|
pimpl=inc.pimpl;
|
|
|
|
inc.pimpl=nullptr;
|
|
|
|
}
|
|
|
|
Texture& Texture::operator = (Texture&& inc)
|
|
|
|
{
|
|
|
|
*(pimpl)=*(inc.pimpl);
|
|
|
|
inc.pimpl=nullptr;
|
|
|
|
return *this;
|
|
|
|
}
|
2017-01-07 09:52:56 +08:00
|
|
|
|
2017-01-05 13:25:09 +08:00
|
|
|
int Texture::getw()
|
|
|
|
{
|
|
|
|
return pimpl->w;
|
|
|
|
}
|
|
|
|
int Texture::geth()
|
|
|
|
{
|
|
|
|
return pimpl->h;
|
|
|
|
}
|
|
|
|
Texture::~Texture()
|
|
|
|
{
|
|
|
|
delete pimpl;
|
|
|
|
}
|