- Timestamp:
- Jan 27, 2006, 10:15:46 AM (19 years ago)
- Location:
- branches/network/src/lib/graphics
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/graphics/Makefile.am
r6782 r6785 16 16 effects/fog_effect.cc \ 17 17 effects/lense_flare.cc 18 18 19 19 20 noinst_HEADERS = graphics_engine.h \ -
branches/network/src/lib/graphics/effects/graphics_effect.cc
r6776 r6785 80 80 void GraphicsEffect::draw() const 81 81 {} 82 83 84 85 /** 86 * ticks the effect if there is any time dependancy 87 */ 88 void GraphicsEffect::tick(float dt) 89 {} -
branches/network/src/lib/graphics/effects/graphics_effect.h
r6777 r6785 26 26 27 27 virtual void draw() const; 28 virtual void tick(float dt); 28 29 29 30 inline bool isActivated() const { return this->bActivated; } -
branches/network/src/lib/graphics/effects/lense_flare.cc
r6783 r6785 41 41 if (root != NULL) 42 42 this->loadParams(root); 43 44 this->flareVector = new Vector(); 45 this->screenCenter = new Vector(); 43 46 } 44 47 … … 52 55 for( it = flares.begin(); it != flares.end(); it++) 53 56 delete (*it); 57 58 delete this-flareVector; 59 delete this->screenCenter; 54 60 } 55 61 … … 104 110 * @param textureName the name of the flare texture 105 111 * 106 * 1st Flare: Texture of the Sun/Light source itself 107 * 2nd Flare: Texture of the 112 * 1st: Texture of the Sun/Light source itself 113 * 2nd: Texture of the fist halo 114 * 3rd: Texture of small burst 115 * 4th: Texture of the second halo 116 * 5th: Texutre of the second burst 117 * 6th: Texture of the third halo 118 * 7th: Texture of the third burst 108 119 */ 109 120 void LenseFlare::addFlare(const char* textureName) … … 112 123 bb->setTexture(textureName); 113 124 this->flares.push_back(bb); 125 126 // the first flare belongs to the light source 127 if( this->flares.size() == 1 && this->lightSource != NULL) 128 { 129 bb->setBindNode(this->lightSource); 130 } 131 } 132 133 134 135 /** 136 * tick the effect 137 */ 138 void LenseFlare::tick(float dt) 139 { 140 114 141 } 115 142 … … 123 150 return; 124 151 125 152 for( it = flares.begin(); it != flares.end(); it++) 153 (*it)->draw(); 126 154 } -
branches/network/src/lib/graphics/effects/lense_flare.h
r6783 r6785 31 31 32 32 virtual void draw() const; 33 virtual void tick(float dt); 33 34 34 35 void addFlare(const char* textureName); … … 44 45 45 46 Vector* flareVector; //!< the axis to draw the flares on 47 Vector* screenCenter; //!< the vector marking the center of the screen 46 48 }; 47 49 -
branches/network/src/lib/graphics/graphics_engine.cc
r6777 r6785 594 594 #endif /* NO_TEXT */ 595 595 596 597 } 596 } 597 598 598 Render2D::getInstance()->tick(dt); 599 600 // tick the graphics effects 601 list<GraphicsEffect*>::iterator it; 602 for (it = this->graphicsEffects.begin(); it != this->graphicsEffects.end(); it++) 603 (*it)->tick(dt); 599 604 } 600 605 … … 608 613 Render2D::getInstance()->draw(E2D_LAYER_ALL); 609 614 Shader::restoreShader(); 615 616 //draw the graphics 617 for (it = this->graphicsEffects.begin(); it != this->graphicsEffects.end(); it++) 618 (*it)->draw(); 610 619 } 611 620
Note: See TracChangeset
for help on using the changeset viewer.