diff options
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  | 
