Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6782 in orxonox.OLD for branches/network/src/lib/graphics/effects


Ignore:
Timestamp:
Jan 26, 2006, 7:43:44 PM (19 years ago)
Author:
patrick
Message:

network: little bit more code :D

Location:
branches/network/src/lib/graphics/effects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/graphics/effects/lense_flare.cc

    r6779 r6782  
    2525#include "texture.h"
    2626
     27#include "render2D/billboard.h"
    2728
    2829using namespace std;
     
    3839 LenseFlare::LenseFlare(const TiXmlElement* root)
    3940{
    40 
    4141  if (root != NULL)
    4242    this->loadParams(root);
     
    6060    LoadParam(root, "add-flare-texture", this, LenseFlare, addFlare)
    6161        .describe("adds a lensflare texture to the engine");
    62 
    6362}
    6463
     
    6867 */
    6968bool LenseFlare::init()
    70 {
    71 
    72 }
     69{}
    7370
    7471
     
    7875bool LenseFlare::activate()
    7976{
    80 
     77  this->bActivated = true;
    8178}
    8279
     
    8784bool LenseFlare::deactivate()
    8885{
    89 
     86  this->bActivated = false;
    9087}
    9188
     
    103100 * @param textureName the name of the flare texture
    104101 */
    105 void addFlare(const char* textureName)
     102void LenseFlare::addFlare(const char* textureName)
    106103{
    107   Texture* texture = new Texture (textureName, GL_TEXTURE);
    108 
    109 
     104  Billboard* bb = new Billboard(NULL);
     105  bb->setTexture(textureName);
    110106}
    111107
    112108
     109/**
     110 * draws the LenseFlares
     111 */
     112void LenseFlare::draw() const
     113{
     114  if( !this->bActivated)
     115    return;
     116
     117}
  • branches/network/src/lib/graphics/effects/lense_flare.h

    r6779 r6782  
    1414class TiXmlElement;
    1515class Light;
    16 class Element2D;
     16class Billboard;
    1717
    1818//! A class that handles LenseFlares. The LenseFlareManager operates on this.
     
    4141  private:
    4242    Light*                   lightSource;        //!< reference to the sun (or primary light source)
    43     std::vector<Element2D*>  flares;             //!< the flares array
     43    std::vector<Billboard*>  flares;             //!< the flares array
    4444};
    4545
Note: See TracChangeset for help on using the changeset viewer.