Changeset 10425 in orxonox.OLD for branches/blink/src/world_entities/effects/blink.cc
- Timestamp:
- Jan 28, 2007, 1:08:54 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/blink/src/world_entities/effects/blink.cc
r10407 r10425 1 1 /* 2 orxonox - the future of 3D-vertical-scrollers3 2 4 3 Copyright (C) 2006 orx … … 50 49 Blink::~Blink () 51 50 { 52 if (this->material)53 delete this->material;51 // if (this->material) 52 // delete this->material; 54 53 } 55 54 … … 65 64 this->toList(OM_COMMON); 66 65 67 this->material = new Material();66 //this->material = new Material(); 68 67 //this->material->setIllum(0); 69 68 //this->material->setDiffuse(1.0,1.0,1.0); … … 73 72 //this->material->setBlendFunc(GL_ZERO,GL_ZERO); 74 73 //this->material->setDiffuseMap("pictures/rblink2.png"); 75 this->material->setDiffuseMap("maps/star_alpha.png");74 //this->material->setDiffuseMap("maps/star_alpha.png"); 76 75 //this->setAbsCoor(0, 0, 0);d 77 76 //this->setVisibiliy(true); … … 90 89 this->setAbsCoor(0, 0, 0); 91 90 this->position = Vector(0, 0, 0); ///remove 92 this->color = Vector(255, 255, 255);91 this->color = Color(1, 1, 0); 93 92 this->size = 10; 94 93 this->omega = 10; … … 151 150 void Blink::draw() const 152 151 { 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(); 158 157 159 158 // Vector pos = this->getAbsCoor(); … … 179 178 // glShadeModel(GL_SMOOTH); 180 179 181 180 /* 182 181 Vector camCoor = State::getCameraNode()->getAbsCoor(); 183 182 Vector diff = camCoor - this->position; … … 186 185 //glTranslatef(position.x + size/2, position.y + size/2, position.z); 187 186 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);*/ 189 188 190 189 // Vector view = this->getAbsCoor() - State::getCameraNode()->getAbsCoor(); … … 194 193 // Vector h = view.cross(up); 195 194 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)); 207 198 208 199 glPopMatrix();
Note: See TracChangeset
for help on using the changeset viewer.