aboutsummaryrefslogtreecommitdiffstats
path: root/src/Texture.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-12-01 08:38:21 -0500
committerClyne Sullivan <tullivan99@gmail.com>2015-12-01 08:38:21 -0500
commitd8554c12fdea5640df0ba42925f296f1711ba389 (patch)
tree8204651ac0e7dc6189ffabb9df39763b19c61886 /src/Texture.cpp
parent45bca98b792f8ced1a57ef8c5beed2a90a79d47f (diff)
andy cant code
Diffstat (limited to 'src/Texture.cpp')
-rw-r--r--src/Texture.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Texture.cpp b/src/Texture.cpp
index 8b40513..a3a8afe 100644
--- a/src/Texture.cpp
+++ b/src/Texture.cpp
@@ -13,7 +13,6 @@ namespace Texture{
GLuint loadTexture(const char *fileName){
SDL_Surface *image;
GLuint object = 0;
- unsigned int i;
for(unsigned int i=0;i<LoadedTextureCounter;i++){
if(!strcmp(LoadedTexture[i]->name,fileName)){
@@ -74,9 +73,13 @@ Texturec::Texturec(uint amt, ...){
va_end(fNames);
}
+Texturec::~Texturec(){
+ delete[] image;
+}
+
void Texturec::bind(unsigned int bn){
texState = bn;
- glBindTexture(GL_TEXTURE_2D, image[texState]);
+ glBindTexture(GL_TEXTURE_2D,image[(int)texState]);
}
void Texturec::bindNext(){