MiniEngine/sdl_engine_texture.hpp

25 lines
362 B
C++
Raw Normal View History

2017-01-05 13:25:09 +08:00
Texture::Texture()
{
pimpl=new impl;
}
Texture::Texture(const Texture& inc) : Texture()
{
*pimpl=*(inc.pimpl);
}
int Texture::getw()
{
return pimpl->w;
}
int Texture::geth()
{
return pimpl->h;
}
Texture::~Texture()
{
delete pimpl;
}
int Texture::updateSize()
{
return SDL_QueryTexture(pimpl->sText.get(),NULL,NULL,&pimpl->w,&pimpl->h);
}