From b447a664066e98cc827626526179b3a3db22fa30 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Wed, 2 Dec 2015 08:48:39 -0500 Subject: world bg improvements --- src/Texture.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/Texture.cpp') 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; } -- cgit v1.2.3