diff options
author | chai <chaifix@163.com> | 2018-12-06 13:12:29 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-12-06 13:12:29 +0800 |
commit | b3712ebdf148bd8d2d31e70734a4b7923f6038f8 (patch) | |
tree | c813d158030ee33b76d7ec23fa2deaa1eb0a4e36 /src/libjin/graphics/je_texture.cpp | |
parent | 17d86218e25a6c889c24822da8d7b59967babd89 (diff) |
*remove create function
Diffstat (limited to 'src/libjin/graphics/je_texture.cpp')
-rw-r--r-- | src/libjin/graphics/je_texture.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/libjin/graphics/je_texture.cpp b/src/libjin/graphics/je_texture.cpp index 7f02c84..8d9bb0a 100644 --- a/src/libjin/graphics/je_texture.cpp +++ b/src/libjin/graphics/je_texture.cpp @@ -14,7 +14,7 @@ namespace JinEngine { namespace Graphics { - +/* Texture* Texture::createTexture(const char* path) { Bitmap* bitmap = Bitmap::createBitmap(path); @@ -28,6 +28,18 @@ namespace JinEngine Texture* tex = new Texture(bitmap); return tex; } +*/ + Texture::Texture() + : Graphic() + { + } + + Texture::Texture(const char* path) + { + Bitmap* bitmap = new Bitmap(path); + new (this) Texture(bitmap); + delete bitmap; + } Texture::Texture(const Bitmap* bitmap) : Graphic(bitmap) |