Changeset 5437 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Oct 26, 2005, 11:01:43 PM (19 years ago)
- Location:
- trunk/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/material.cc
r5374 r5437 91 91 { 92 92 glEnable(GL_BLEND); 93 glBlendFunc(GL_SRC_ALPHA, GL_ONE); 93 94 glColor4f(*(this->diffuse), *(this->diffuse+1), *(this->diffuse+2), this->transparency); 94 glBlendFunc(GL_SRC_ALPHA, GL_ONE);95 95 } 96 96 else -
trunk/src/lib/graphics/importer/primitive_model.cc
r4836 r5437 84 84 { 85 85 float vj = j/df *PI; 86 this->addVertexNormal(cos(vi) * cos(vj), 87 sin(vj), 88 sin(vi) * cos(vj)); 89 86 90 this->addVertex(size * cos(vi) * cos(vj), 87 91 size * sin(vj), 88 92 size * sin(vi) * cos(vj)); 93 89 94 this->addVertexTexture(i / (df *2.0), (j-1.0)/(df)+.5); 90 95 } 91 96 } 92 97 this->addVertex(0, -size, 0); 98 this->addVertexNormal(0, -1, 0); 93 99 this->addVertexTexture(0,0); 94 100 this->addVertex(0, size, 0); 101 this->addVertexNormal(0, 1, 0); 95 102 this->addVertexTexture(0 ,1); 96 103 … … 119 126 { 120 127 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); 122 129 } 123 130 else if (j == detail) 124 131 { 125 132 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); 127 134 } 128 135 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); 130 137 } 131 138 }
Note: See TracChangeset
for help on using the changeset viewer.