Changeset 3406 in orxonox.OLD for orxonox/branches/dave/src
- Timestamp:
- Feb 14, 2005, 3:52:14 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/dave/src/world.cc
r3405 r3406 371 371 372 372 // initialize debug coord system 373 //fog initialisation 374 375 //float fog_color[]={0.8f,0.8f,0.2f,1.0f}; 376 377 //glEnable(GL_FOG); 378 //glLoadIdentity(); 379 //glFogi(GL_FOG_MODE,GL_EXP); 380 //glFogf(GL_FOG_DENSITY,.02f); 381 //glFogfv(GL_FOG_COLOR,fog_color); 382 //glClearColor(.8f,.8f,.8f,1.0f); 383 373 384 374 385 … … 392 403 393 404 glBegin(GL_QUADS); 405 406 394 407 395 408 int sizeX = 100; … … 447 460 Vector v4 = Vector (widthX*(i), height[i][j+1]-20, widthZ*(j+1)-width/2); 448 461 float a[3]; 449 if(height[i][j]<snowheight){ 462 a[0]=1.0; 463 a[1]=1.0; 464 a[2]=1.0; 465 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 466 /*if(height[i][j]<snowheight){ 450 467 a[0]=0; 451 468 a[1]=1.0-height[i][j]/10-.3; … … 459 476 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 460 477 461 } 478 }*/ 462 479 glNormal3f(normal_vectors[i][j].x, normal_vectors[i][j].y, normal_vectors[i][j].z); 463 glTexCoord2f((float)i/(float)sizeX,(float)j/(float)sizeZ); 480 glTexCoord2f(0.0f,0.0f); 481 //glTexCoord2f((float)i/(float)sizeX,(float)j/(float)sizeZ); 464 482 glVertex3f(v1.x, v1.y, v1.z); 465 466 483 484 /* 467 485 if(height[i+1][j]<snowheight){ 468 486 a[0]=0; … … 476 494 a[2]=1.0; 477 495 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 478 } 496 }*/ 479 497 glNormal3f(normal_vectors[i+1][j].x, normal_vectors[i+1][j].y, normal_vectors[i+1][j].z); 480 glTexCoord2f((float)(i+1.0)/(float)sizeX,(float)j/(float)sizeZ); 498 glTexCoord2f(1.0f,0.0f); 499 //glTexCoord2f((float)(i+1.0)/(float)sizeX,(float)j/(float)sizeZ); 481 500 glVertex3f(v2.x, v2.y, v2.z); 482 501 /* 483 502 if(height[i+1][j+1]<snowheight){ 484 503 a[0]=0; … … 492 511 a[2]=1.0; 493 512 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 494 } 513 }*/ 495 514 glNormal3f(normal_vectors[i+1][j+1].x, normal_vectors[i+1][j+1].y, normal_vectors[i+1][j+1].z); 496 glTexCoord2f((float)(i+1.0)/(float)sizeX,(float)(j+1.0)/(float)sizeZ); 515 glTexCoord2f(1.0f,1.0f); 516 //glTexCoord2f((float)(i+1.0)/(float)sizeX,(float)(j+1.0)/(float)sizeZ); 497 517 glVertex3f(v3.x, v3.y, v3.z); 498 518 /* 499 519 if(height[i][j+1]<snowheight){ 500 520 a[0]=0; … … 508 528 a[2]=1.0; 509 529 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 510 } 530 }*/ 511 531 glNormal3f(normal_vectors[i][j+1].x, normal_vectors[i][j+1].y, normal_vectors[i][j+1].z); 512 glTexCoord2f((float)(i)/(float)sizeX,(float)(j+1.0)/(float)sizeZ); 532 glTexCoord2f(0.0f,1.0f); 533 //glTexCoord2f((float)(i)/(float)sizeX,(float)(j+1.0)/(float)sizeZ); 513 534 glVertex3f(v4.x, v4.y, v4.z); 514 535 … … 517 538 518 539 // Disable Textures Again, for Performance reasons. 540 //glLoadIdentity(); 519 541 glDisable(GL_TEXTURE_2D); 520 542 … … 594 616 */ 595 617 glEndList(); 618 619 596 620 } 597 621 … … 658 682 659 683 // draw debug coord system 684 //glLoadIdentity(); 660 685 glCallList (objectList); 661 686
Note: See TracChangeset
for help on using the changeset viewer.