Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 28, 2007, 1:08:54 AM (18 years ago)
Author:
stefalie
Message:

blink: 1 bug less

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/blink/src/world_entities/effects/blink.cc

    r10407 r10425  
    11/*
    2    orxonox - the future of 3D-vertical-scrollers
    32
    43   Copyright (C) 2006 orx
     
    5049Blink::~Blink ()
    5150{
    52   if (this->material)
    53     delete this->material;
     51//  if (this->material)
     52  //  delete this->material;
    5453}
    5554
     
    6564  this->toList(OM_COMMON);
    6665
    67   this->material = new Material();
     66  //this->material = new Material();
    6867  //this->material->setIllum(0);
    6968  //this->material->setDiffuse(1.0,1.0,1.0);
     
    7372  //this->material->setBlendFunc(GL_ZERO,GL_ZERO);
    7473  //this->material->setDiffuseMap("pictures/rblink2.png");
    75   this->material->setDiffuseMap("maps/star_alpha.png");
     74  //this->material->setDiffuseMap("maps/star_alpha.png");
    7675  //this->setAbsCoor(0, 0, 0);d
    7776  //this->setVisibiliy(true);
     
    9089  this->setAbsCoor(0, 0, 0);
    9190  this->position = Vector(0, 0, 0); ///remove
    92   this->color = Vector(255, 255, 255);
     91  this->color = Color(1, 1, 0);
    9392  this->size = 10;
    9493  this->omega = 10;
     
    151150void Blink::draw() const
    152151{
    153   glPushAttrib(GL_ENABLE_BIT);
    154   glEnable(GL_LIGHTING); //glDisable(GL_LIGHTING);
    155   glDisable(GL_FOG);
    156   glMatrixMode(GL_MODELVIEW);
    157   glPushMatrix();
     152//   glPushAttrib(GL_ENABLE_BIT);
     153//   glEnable(GL_LIGHTING); //glDisable(GL_LIGHTING);
     154//   glDisable(GL_FOG);
     155//   glMatrixMode(GL_MODELVIEW);
     156//   glPushMatrix();
    158157
    159158//   Vector pos = this->getAbsCoor();
     
    179178//   glShadeModel(GL_SMOOTH);
    180179
    181 
     180/*
    182181  Vector camCoor = State::getCameraNode()->getAbsCoor();
    183182  Vector diff = camCoor - this->position;
     
    186185  //glTranslatef(position.x + size/2, position.y + size/2, position.z);
    187186
    188   glTranslatef(this->position.x - this->size/2, this->position.y - this->size/2, this->position.z);
     187  glTranslatef(this->position.x - this->size/2, this->position.y - this->size/2, this->position.z);*/
    189188
    190189//   Vector view = this->getAbsCoor() - State::getCameraNode()->getAbsCoor();
     
    194193//   Vector h = view.cross(up);
    195194
    196   this->material->select();
    197 
    198   this->bBoard->colorTexture(Color(1, 0, 0, 0));
    199   //glColor4ub(this->color.x, this->color.y, this->color.z, 127.5*(this->blinkStr + 1));
    200 //   glBegin(GL_QUADS);
    201 //     glTexCoord2f(1, 1); glVertex3f(0, 0, 0);
    202 //     glTexCoord2f(1, 0); glVertex3f(this->size, 0, 0);
    203 //     glTexCoord2f(0, 0); glVertex3f(this->size, this->size, 0);
    204 //     glTexCoord2f(0, 1); glVertex3f(0, this->size, 0);
    205 //   glEnd();
    206 
     195  //this->material->select();
     196  PRINTF(0)("\n\n\n\n::%f,%f,%f\n\n\n\n", color.r(), color.g(), color.b());
     197  this->bBoard->colorTexture(Color(color.r(), color.g(), color.b(), 1));
    207198
    208199  glPopMatrix();
Note: See TracChangeset for help on using the changeset viewer.