Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/spaceshipcontrol/src/lib/graphics/effects/fog_effect.cc @ 6911

Last change on this file since 6911 was 6752, checked in by patrick, 19 years ago

network: work flush, merge work

File size: 1.5 KB
Line 
1
2
3/*
4   orxonox - the future of 3D-vertical-scrollers
5
6   Copyright (C) 2004 orx
7
8   This program is free software; you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation; either version 2, or (at your option)
11   any later version.
12
13### File Specific:
14   main-programmer: Patrick Boenzli
15*/
16
17#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GRAPHICS
18
19#include "fog_effect.h"
20
21#include "load_param.h"
22#include "factory.h"
23
24
25using namespace std;
26
27CREATE_FACTORY(FogEffect, CL_LIGHT);
28
29
30
31/**
32 *  default constructor
33 * @param root The XML-element to load the FogEffect from
34 */
35 FogEffect::FogEffect(const TiXmlElement* root)
36{
37
38  if (root != NULL)
39    this->loadParams(root);
40}
41
42
43/**
44 *  destroys a FogEffect
45 */
46FogEffect::~FogEffect()
47{}
48
49
50/**
51 * @param root The XML-element to load the FogEffect from
52 */
53void FogEffect::loadParams(const TiXmlElement* root)
54{
55  GraphicsEffect::loadParams(root);
56
57//   LoadParam(root, "diffuse-color", this, FogEffect, setDiffuseColor)
58//       .describe("sets the diffuse color of the FogEffect (red [0-1], green [0-1], blue [0-1])");
59}
60
61
62/**
63 * initializes the fog effect
64 */
65bool FogEffect::init()
66{}
67
68
69/**
70 * activates the fog effect
71 */
72bool FogEffect::activate()
73{
74/*  glEnable(GL_FOG);
75  {
76    GLfloat fogColor[4] = {0.5, 0.5, 1.0};
77
78    GLint fogMode = GL_EXP;
79    glFogi(GL_FOG_MODE, fogMode);
80    glFogfv(GL_FOG_COLOR, fogColor);
81    gfFogf(GL_FOG_DENSITY, 0.35f);
82
83
84  }*/
85}
86
87
88/**
89 * deactivates the fog effect
90 */
91bool FogEffect::deactivate()
92{}
Note: See TracBrowser for help on using the repository browser.