diff options
author | chai <chaifix@163.com> | 2018-10-21 16:21:16 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-21 16:21:16 +0800 |
commit | 07770f3ad369ff47386310b731d349f7af1fe0d9 (patch) | |
tree | 7547b1a8b2beaceb31ea1b62edbdaa5cd6a1b247 /src/libjin/Graphics/je_texture.cpp | |
parent | 066e5987c515dfc34537d73ca9d2a81ddd1f9e1b (diff) |
*修改编译控制
Diffstat (limited to 'src/libjin/Graphics/je_texture.cpp')
-rw-r--r-- | src/libjin/Graphics/je_texture.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
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 <fstream> @@ -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 |