From 07770f3ad369ff47386310b731d349f7af1fe0d9 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 21 Oct 2018 16:21:16 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=E7=BC=96=E8=AF=91=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Graphics/je_texture.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (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 da56047..d191c8b 100644 --- a/src/libjin/Graphics/je_texture.cpp +++ b/src/libjin/Graphics/je_texture.cpp @@ -1,5 +1,5 @@ #include "../core/je_configuration.h" -#if LIBJIN_MODULES_RENDER +#if defined(jin_graphics) #include @@ -8,12 +8,20 @@ #include "je_texture.h" +using namespace JinEngine::Math; + namespace JinEngine { namespace Graphics { - using namespace JinEngine::Math; + Texture* Texture::createTexture(const char* path) + { + Bitmap* bitmap = Bitmap::createBitmap(path); + Texture* texture = createTexture(bitmap); + delete bitmap; + return texture; + } /*static*/ Texture* Texture::createTexture(Bitmap* bitmap) { @@ -33,4 +41,4 @@ namespace JinEngine } // namespace Graphics } // namespace JinEngine -#endif // LIBJIN_MODULES_RENDER \ No newline at end of file +#endif // defined(jin_graphics) \ No newline at end of file -- cgit v1.1-26-g67d0