Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.