Changeset 3728 in orxonox.OLD for orxonox/branches/shadows/src/world.cc
- Timestamp:
- Apr 5, 2005, 9:53:42 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/shadows/src/world.cc
r3706 r3728 44 44 this->debugWorldNr = -1; 45 45 this->entities = new tList<WorldEntity>(); 46 46 47 } 47 48 … … 291 292 292 293 //create shadow 293 float a[]={1.0,1.0,1.0,4.0};294 this->shadow =new Shadow(myPlayer->model,(Player*)myPlayer ,a);294 295 this->shadow =new Shadow(myPlayer->model,(Player*)myPlayer); 295 296 shadow->init(); 296 297 … … 406 407 407 408 408 glBegin(GL_QUADS);409 409 410 410 411 … … 419 420 float height [sizeX][sizeZ]; 420 421 Vector normal_vectors[sizeX][sizeZ]; 422 Vector vertexes[sizeX][sizeZ]; 423 424 glBegin(GL_QUADS); 421 425 422 426 … … 453 457 normal_vectors[i][j]=c1.cross(v3-v5)+c2.cross(v4-v2)+c3.cross(v5-v3)+c4.cross(v2-v4); 454 458 normal_vectors[i][j].normalize(); 459 shadow->setNormal(normal_vectors[i][j],i,j); 455 460 } 456 461 … … 468 473 a[2]=1.0; 469 474 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 475 shadow->setVertexNum(v1,i,j,0); 476 shadow->setVertexNum(v2,i,j,1); 477 shadow->setVertexNum(v3,i,j,2); 478 shadow->setVertexNum(v4,i,j,3); 479 480 481 470 482 471 483 glNormal3f(normal_vectors[i][j].x, normal_vectors[i][j].y, normal_vectors[i][j].z); … … 473 485 //glTexCoord2f((float)i/(float)sizeX,(float)j/(float)sizeZ); 474 486 glVertex3f(v1.x, v1.y, v1.z); 475 476 487 477 488 glNormal3f(normal_vectors[i+1][j].x, normal_vectors[i+1][j].y, normal_vectors[i+1][j].z); … … 492 503 } 493 504 glEnd(); 505 shadow->setGround(); 494 506 495 507 // Disable Textures Again, for Performance reasons.
Note: See TracChangeset
for help on using the changeset viewer.