/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: Patrick Boenzli */ #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS #include "fog_effect.h" #include "load_param.h" #include "factory.h" using namespace std; CREATE_FACTORY(FogEffect, CL_LIGHT); /** * default constructor * @param root The XML-element to load the FogEffect from */ FogEffect::FogEffect(const TiXmlElement* root) { if (root != NULL) this->loadParams(root); } /** * destroys a FogEffect */ FogEffect::~FogEffect() {} /** * @param root The XML-element to load the FogEffect from */ void FogEffect::loadParams(const TiXmlElement* root) { GraphicsEffect::loadParams(root); // LoadParam(root, "diffuse-color", this, FogEffect, setDiffuseColor) // .describe("sets the diffuse color of the FogEffect (red [0-1], green [0-1], blue [0-1])"); } /** * initializes the fog effect */ bool FogEffect::init() {} /** * activates the fog effect */ bool FogEffect::activate() { /* glEnable(GL_FOG); { GLfloat fogColor[4] = {0.5, 0.5, 1.0}; GLint fogMode = GL_EXP; glFogi(GL_FOG_MODE, fogMode); glFogfv(GL_FOG_COLOR, fogColor); gfFogf(GL_FOG_DENSITY, 0.35f); }*/ } /** * deactivates the fog effect */ bool FogEffect::deactivate() {}