Added code to support toggling between windowed and fullscreen mode for win32 platform.

This commit is contained in:
Mark Vejvoda
2010-04-05 20:42:05 +00:00
parent c525407904
commit b7a5970a3c
6 changed files with 29 additions and 26 deletions

View File

@@ -12,6 +12,7 @@
#include "texture_manager.h"
#include <cstdlib>
#include <stdexcept>
#include "graphics_interface.h"
#include "graphics_factory.h"
@@ -47,9 +48,16 @@ void TextureManager::endTexture(Texture **texture) {
}
}
void TextureManager::init(){
void TextureManager::init(bool forceInit) {
for(int i=0; i<textures.size(); ++i){
textures[i]->init(textureFilter, maxAnisotropy);
Texture *texture = textures[i];
if(texture == NULL) {
throw std::runtime_error("texture == NULL during init");
}
if(forceInit == true) {
texture->reseInitState();
}
texture->init(textureFilter, maxAnisotropy);
}
}