diff options
author | chai <chaifix@163.com> | 2020-02-11 11:29:07 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-02-11 11:29:07 +0800 |
commit | 160e1299ef3d95f8e8c48706d7f61dd3dc6c6b60 (patch) | |
tree | abe5ae5242d9cc6caf6edf103e662c44e978fca0 /src/libjin/graphics/texture.cpp | |
parent | e095043485d1d298571af6d9eca7f0db9009ea7a (diff) |
Diffstat (limited to 'src/libjin/graphics/texture.cpp')
-rw-r--r-- | src/libjin/graphics/texture.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/libjin/graphics/texture.cpp b/src/libjin/graphics/texture.cpp index ba8a33a..45432d1 100644 --- a/src/libjin/graphics/texture.cpp +++ b/src/libjin/graphics/texture.cpp @@ -12,34 +12,34 @@ using namespace JinEngine::Math; namespace JinEngine { - namespace Graphics - { - - Texture::Texture() - : Graphic() - { - ++gl.getStats().textures; - } - - Texture::Texture(const char* path) - { - Bitmap* bitmap = new Bitmap(path); - new (this) Texture(bitmap); - delete bitmap; - } - - Texture::Texture(const Bitmap* bitmap) - : Graphic(bitmap) - { - ++gl.getStats().textures; - } - - Texture::~Texture() - { - --gl.getStats().textures; - } - - } // namespace Graphics + namespace Graphics + { + + Texture::Texture() + : Graphic() + { + ++gl.getStats().textures; + } + + Texture::Texture(const char* path) + { + Bitmap* bitmap = new Bitmap(path); + new (this) Texture(bitmap); + delete bitmap; + } + + Texture::Texture(const Bitmap* bitmap) + : Graphic(bitmap) + { + ++gl.getStats().textures; + } + + Texture::~Texture() + { + --gl.getStats().textures; + } + + } // namespace Graphics } // namespace JinEngine #endif // defined(jin_graphics)
\ No newline at end of file |