From 5ceb4694a05ec68b5cfba18b0f25ba804be88a80 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 12 May 2008 18:32:15 +0000 Subject: console colors --- src/render/textures.cc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/render/textures.cc') diff --git a/src/render/textures.cc b/src/render/textures.cc index 8dac3a3..cfd627c 100644 --- a/src/render/textures.cc +++ b/src/render/textures.cc @@ -1,7 +1,7 @@ /* render/textures.cc - This file is part of the Osirion project and is distributed under - the terms of the GNU General Public License version 2 + This file is part of the Osirion project and is distributed under + the terms of the GNU General Public License version 2 */ @@ -13,7 +13,8 @@ #include "sys/sys.h" #include "core/application.h" -namespace render { +namespace render +{ std::map Textures::registry; size_t Textures::index = 0; @@ -22,7 +23,7 @@ GLuint Textures::textures[MAXTEXTURES]; void Textures::init() { clear(); - con_print << "Loading textures..." << std::endl; + con_print << "^BLoading textures..." << std::endl; // "no texture" bitmap load("textures/common/notex"); @@ -44,7 +45,7 @@ void Textures::init() // crosshairs load("bitmaps/crosshair"); - + // light flares load("bitmaps/fx/flare00"); load("bitmaps/fx/flare01"); @@ -72,7 +73,7 @@ size_t Textures::load(std::string name, bool filter) if (it != registry.end()) return (*it).second; - // try the tga version + // try the tga version std::string filename(name); filename.append(".tga"); Image *image = TGA::load(filename.c_str()); @@ -101,7 +102,7 @@ size_t Textures::load(std::string name, bool filter) texture_type = GL_RGB; gluBuild2DMipmaps(GL_TEXTURE_2D, image->channels(), - image->width(), image->height(), texture_type, GL_UNSIGNED_BYTE, image->data()); + image->width(), image->height(), texture_type, GL_UNSIGNED_BYTE, image->data()); set_filter(filter); @@ -153,10 +154,10 @@ void Textures::set_filter(bool filter) { if (filter) { glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST); - glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR_MIPMAP_LINEAR); + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR_MIPMAP_LINEAR); } else { glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); - } + glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); } } +} -- cgit v1.2.3