simply change the type to GLint instead of casting around
authorMatthias Braun <matze@braunis.de>
Tue, 11 Apr 2006 09:59:15 +0000 (09:59 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 11 Apr 2006 09:59:15 +0000 (09:59 +0000)
SVN-Revision: 3293

src/video/texture_manager.cpp
src/video/texture_manager.hpp

index 42f59c1..255efba 100644 (file)
@@ -148,19 +148,19 @@ TextureManager::save_texture(Texture* texture)
   saved_texture.texture = texture;
   glBindTexture(GL_TEXTURE_2D, texture->get_handle());
   glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH,
-                           (GLint*)&saved_texture.width);
+                           &saved_texture.width);
   glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT,
-                           (GLint*)&saved_texture.height);
+                           &saved_texture.height);
   glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_BORDER,
-                           (GLint*)&saved_texture.border);
+                           &saved_texture.border);
   glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
-                      (GLint*)&saved_texture.min_filter);
+                      &saved_texture.min_filter);
   glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
-                      (GLint*)&saved_texture.mag_filter);
+                      &saved_texture.mag_filter);
   glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,
-                      (GLint*)&saved_texture.wrap_s);
+                      &saved_texture.wrap_s);
   glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,
-                      (GLint*)&saved_texture.wrap_t);
+                      &saved_texture.wrap_t);
 
   size_t pixelssize = saved_texture.width * saved_texture.height * 4;
   saved_texture.pixels = new char[pixelssize];
@@ -173,7 +173,7 @@ TextureManager::save_texture(Texture* texture)
   glDeleteTextures(1, &(texture->handle));
   texture->handle = 0;
 
-  assert_gl("retrieving texture");
+  assert_gl("retrieving texture for save");
 }
 
 void
index 0b0854f..4d89b06 100644 (file)
@@ -39,15 +39,15 @@ private:
   struct SavedTexture
   {
     Texture* texture;
-    int width;
-    int height;
+    GLint width;
+    GLint height;
     char* pixels;
-    int border;                              
+    GLint border;                              
 
-    int min_filter;
-    int mag_filter;
-    int wrap_s;
-    int wrap_t;
+    GLint min_filter;
+    GLint mag_filter;
+    GLint wrap_s;
+    GLint wrap_t;
   };
   std::vector<SavedTexture> saved_textures;