Delayed root hatching
[supertux.git] / src / video / texture.cpp
index 98bfc91..9c41ddd 100644 (file)
@@ -1,7 +1,7 @@
 //  $Id$
 //
-//  SuperTux -  A Jump'n Run
-//  Copyright (C) 2004 Matthias Braun <matze@braunis.de
+//  SuperTux
+//  Copyright (C) 2006 Matthias Braun <matze@braunis.de>
 //
 //  This program is free software; you can redistribute it and/or
 //  modify it under the terms of the GNU General Public License
@@ -16,6 +16,7 @@
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+
 #include <config.h>
 
 #include "texture.hpp"
@@ -36,10 +37,10 @@ Texture::Texture(unsigned int w, unsigned int h, GLenum glformat)
 
   this->width = w;
   this->height = h;
-  
+
   assert_gl("before creating texture");
   glGenTextures(1, &handle);
-  
+
   try {
     glBindTexture(GL_TEXTURE_2D, handle);
 
@@ -60,13 +61,13 @@ Texture::Texture(SDL_Surface* image, GLenum glformat)
     throw std::runtime_error("image has no power of 2 size");
   if(format->BitsPerPixel != 24 && format->BitsPerPixel != 32)
     throw std::runtime_error("image has no 24 or 32 bit color depth");
-  
+
   this->width = image->w;
   this->height = image->h;
 
   assert_gl("before creating texture");
   glGenTextures(1, &handle);
-  
+
   try {
     GLenum sdl_format;
     if(format->BytesPerPixel == 3)
@@ -84,7 +85,7 @@ Texture::Texture(SDL_Surface* image, GLenum glformat)
 
     assert_gl("creating texture");
 
-    set_texture_params();    
+    set_texture_params();
   } catch(...) {
     glDeleteTextures(1, &handle);
     throw;
@@ -96,12 +97,6 @@ Texture::~Texture()
   glDeleteTextures(1, &handle);
 }
 
-void upload_texture(SDL_Surface* , int , int , int , int , int , int )
-{
-  // TODO
-  assert(false);
-}
-
 void
 Texture::set_texture_params()
 {
@@ -109,8 +104,6 @@ Texture::set_texture_params()
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
-  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_CLAMP);
 
   assert_gl("set texture params");
 }
-