From 5a4ba5e7cfc6b0eaaa5a9f021443bec3a30adca2 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 11 Apr 2006 09:59:15 +0000 Subject: [PATCH] simply change the type to GLint instead of casting around SVN-Revision: 3293 --- src/video/texture_manager.cpp | 16 ++++++++-------- src/video/texture_manager.hpp | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/video/texture_manager.cpp b/src/video/texture_manager.cpp index 42f59c159..255efba48 100644 --- a/src/video/texture_manager.cpp +++ b/src/video/texture_manager.cpp @@ -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 diff --git a/src/video/texture_manager.hpp b/src/video/texture_manager.hpp index 0b0854faa..4d89b06c6 100644 --- a/src/video/texture_manager.hpp +++ b/src/video/texture_manager.hpp @@ -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 saved_textures; -- 2.11.0