mirror of
https://github.com/glest/glest-source.git
synced 2025-08-19 14:41:23 +02:00
bug fix to properly initialize textures dynamically loaded when loading a faction.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// ==============================================================
|
||||
// This file is part of Glest Shared Library (www.glest.org)
|
||||
//
|
||||
// Copyright (C) 2001-2008 Marti<EFBFBD>o Figueroa
|
||||
// Copyright (C) 2001-2008 Martio Figueroa
|
||||
//
|
||||
// You can redistribute this code and/or modify it under
|
||||
// the terms of the GNU General Public License as published
|
||||
@@ -33,6 +33,20 @@ TextureManager::~TextureManager(){
|
||||
end();
|
||||
}
|
||||
|
||||
void TextureManager::initTexture(Texture *texture) {
|
||||
if(texture != NULL) {
|
||||
texture->init(textureFilter, maxAnisotropy);
|
||||
}
|
||||
}
|
||||
|
||||
void TextureManager::endTexture(Texture **texture) {
|
||||
if(texture != NULL && *texture != NULL) {
|
||||
(*texture)->end();
|
||||
delete (*texture);
|
||||
*texture = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void TextureManager::init(){
|
||||
for(int i=0; i<textures.size(); ++i){
|
||||
textures[i]->init(textureFilter, maxAnisotropy);
|
||||
|
Reference in New Issue
Block a user