Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/graphics/effects/graphics_effect.cc @ 6977

Last change on this file since 6977 was 6977, checked in by patrick, 18 years ago

trunk: fog-effect should be loadable but isn't

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
20#include "graphics_effect.h"
21
22#include "graphics_engine.h"
23#include "load_param.h"
24
25
26using namespace std;
27
28
29
30/**
31 * @param root The XML-element to load the GraphicsEffect from
32
33  @todo what to do, if no GraphicsEffect-Slots are open anymore ???
34 */
35GraphicsEffect::GraphicsEffect(const TiXmlElement* root)
36{
37  this->setClassID(CL_GRAPHICS_EFFECT, "GraphicsEffect");
38  this->bActivated = false;
39
40  this->bActivated = GraphicsEngine::getInstance()->loadGraphicsEffect(this);
41}
42
43
44/**
45 *  destroys a GraphicsEffect
46 */
47GraphicsEffect::~GraphicsEffect()
48{
49  if( this->bActivated)
50    GraphicsEngine::getInstance()->unloadGraphicsEffect(this);
51}
52
53
54/**
55 * @param root The XML-element to load the GraphicsEffect from
56 */
57void GraphicsEffect::loadParams(const TiXmlElement* root)
58{
59  BaseObject::loadParams(root);
60}
61
62
63/**
64 *  initializes the graphics effect
65 */
66bool GraphicsEffect::init()
67{}
68
69
70
71/**
72 * draws the effect, if needed
73 */
74void GraphicsEffect::draw() const
75{}
76
77
78
79/**
80 * ticks the effect if there is any time dependancy
81 */
82void GraphicsEffect::tick(float dt)
83{}
Note: See TracBrowser for help on using the repository browser.