diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2015-12-02 08:48:39 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2015-12-02 08:48:39 -0500 |
commit | b447a664066e98cc827626526179b3a3db22fa30 (patch) | |
tree | 9947254b1256e87ad167986b5bac9cf5be49c7d6 /src/Texture.cpp | |
parent | 1d995c34c871bdb48e35c083ef0d9027dc18d719 (diff) |
world bg improvements
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; } |