From b3712ebdf148bd8d2d31e70734a4b7923f6038f8 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 6 Dec 2018 13:12:29 +0800 Subject: *remove create function --- src/libjin/graphics/je_texture.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/libjin/graphics/je_texture.cpp') 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) -- cgit v1.1-26-g67d0