diff options
Diffstat (limited to 'src/Texture.cpp')
-rw-r--r-- | src/Texture.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Texture.cpp b/src/Texture.cpp index a3a8afe..a44f1a7 100644 --- a/src/Texture.cpp +++ b/src/Texture.cpp @@ -23,6 +23,9 @@ namespace Texture{ } } + if(!fileName) + return 0; + if(!(image = IMG_Load(fileName))) return 0; #ifdef DEBUG @@ -73,6 +76,14 @@ Texturec::Texturec(uint amt, ...){ va_end(fNames); } +Texturec::Texturec(uint amt,const char **paths){ + texState = 0; + image = new GLuint[amt]; + for(int i = 0; i < amt; i++){ + image[i] = Texture::loadTexture(paths[i]); + } +} + Texturec::~Texturec(){ delete[] image; } |