Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5437 in orxonox.OLD for trunk/src/lib/graphics/importer


Ignore:
Timestamp:
Oct 26, 2005, 11:01:43 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Sphers Rendered around the Turret-Power-Up (this looks really bad)

Location:
trunk/src/lib/graphics/importer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/material.cc

    r5374 r5437  
    9191    {
    9292      glEnable(GL_BLEND);
     93      glBlendFunc(GL_SRC_ALPHA, GL_ONE);
    9394      glColor4f(*(this->diffuse), *(this->diffuse+1), *(this->diffuse+2), this->transparency);
    94       glBlendFunc(GL_SRC_ALPHA, GL_ONE);
    9595    }
    9696  else
  • trunk/src/lib/graphics/importer/primitive_model.cc

    r4836 r5437  
    8484        {
    8585          float vj = j/df *PI;
     86          this->addVertexNormal(cos(vi) * cos(vj),
     87                                sin(vj),
     88                                sin(vi) * cos(vj));
     89
    8690          this->addVertex(size * cos(vi) * cos(vj),
    8791                          size * sin(vj),
    8892                          size * sin(vi) * cos(vj));
     93
    8994          this->addVertexTexture(i / (df *2.0), (j-1.0)/(df)+.5);
    9095        }
    9196    }
    9297  this->addVertex(0, -size, 0);
     98  this->addVertexNormal(0, -1, 0);
    9399  this->addVertexTexture(0,0);
    94100  this->addVertex(0, size, 0);
     101  this->addVertexNormal(0, 1, 0);
    95102  this->addVertexTexture(0 ,1);
    96103
     
    119126            {
    120127              v1 = this->getVertexCount() - 2;
    121               this->addFace(3, VERTEX_TEXCOORD, v1, v1, v3, v3, v4, v4);
     128              this->addFace(3, VERTEX_TEXCOORD_NORMAL, v1, v1, v1, v3, v3, v3, v4, v4, v4);
    122129            }
    123130          else if (j == detail)
    124131            {
    125132              v3 = this->getVertexCount()-1;
    126               this->addFace(3, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3);
     133              this->addFace(3, VERTEX_TEXCOORD_NORMAL, v1, v1, v1, v2, v2, v2, v3, v3, v3);
    127134            }
    128135          else
    129             this->addFace(4, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3, v4, v4);
     136            this->addFace(4, VERTEX_TEXCOORD_NORMAL, v1, v1, v1, v2, v2, v2, v3, v3, v3, v4, v4, v4);
    130137        }
    131138    }
Note: See TracChangeset for help on using the changeset viewer.