Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-05-12 18:32:15 +0000
committerStijn Buys <ingar@osirion.org>2008-05-12 18:32:15 +0000
commit5ceb4694a05ec68b5cfba18b0f25ba804be88a80 (patch)
treed1baddc086de4bb4fa04cf59d11516f4ecc89bf3 /src/render/textures.cc
parente4f2faa8d5895ba30207c09c7886afb21a697d5f (diff)
console colors
Diffstat (limited to 'src/render/textures.cc')
-rw-r--r--src/render/textures.cc21
1 files changed, 11 insertions, 10 deletions
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<std::string, size_t> 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);
}
}
+}