Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 28, 2007, 12:01:34 PM (19 years ago)
Author:
patrick
Message:

merged blinki into trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/effects/billboard.cc

    r10114 r10433  
    2424
    2525
    26 
     26#include "debug.h"
    2727
    2828
     
    6666  //this->setVisibiliy(true);
    6767  this->setSize(5, 5);
     68
     69  this->texColor = NULL;
    6870}
    6971
     
    147149//v += this->getAbsCoor();
    148150    //PRINTF(0)("sizeX: %f sizeY: %f\n", sizeX, sizeY);
     151
     152  // changes the color of the texture (if any is set)
     153  if(this->texColor != NULL)
     154    glColor4ub((GLubyte)this->texColor->r()*255, (GLubyte)this->texColor->g()*255, (GLubyte)this->texColor->b()*255, (GLubyte)(this->texColor->a()*255));
     155
    149156  glBegin(GL_QUADS);
    150157  glTexCoord2f(0.0f, 0.0f);
     
    171178  glPopAttrib();
    172179}
     180
     181
     182/**
     183 * changes the texture color
     184 * @param col color for the texture
     185 */
     186void Billboard::colorTexture(const Color col)
     187{
     188  this->texColor = new Color(col.r(), col.g(), col.b(), col.a());
     189}
Note: See TracChangeset for help on using the changeset viewer.