Changeset 3407 in orxonox.OLD for orxonox/branches/dave/src
- Timestamp:
- Feb 17, 2005, 7:22:34 PM (20 years ago)
- Location:
- orxonox/branches/dave/src
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/dave/src/Makefile.am
r3377 r3407 36 36 matrix.cc \ 37 37 curve.cc \ 38 glmenu_imagescreen.cc 38 glmenu_imagescreen.cc\ 39 skybox.cc 39 40 40 41 … … 78 79 curve.h \ 79 80 glmenu_imagescreen.h \ 80 debug.h 81 debug.h\ 82 skybox.h 81 83 82 84 -
orxonox/branches/dave/src/Makefile.in
r3401 r3407 63 63 p_node.$(OBJEXT) null_parent.$(OBJEXT) base_object.$(OBJEXT) \ 64 64 helper_parent.$(OBJEXT) track_manager.$(OBJEXT) \ 65 matrix.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) 65 matrix.$(OBJEXT) curve.$(OBJEXT) glmenu_imagescreen.$(OBJEXT) \ 66 skybox.$(OBJEXT) 66 67 orxonox_OBJECTS = $(am_orxonox_OBJECTS) 67 68 orxonox_LDADD = $(LDADD) … … 84 85 @AMDEP_TRUE@ ./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/orxonox.Po \ 85 86 @AMDEP_TRUE@ ./$(DEPDIR)/p_node.Po ./$(DEPDIR)/player.Po \ 86 @AMDEP_TRUE@ ./$(DEPDIR)/s tory_entity.Po ./$(DEPDIR)/texture.Po \87 @AMDEP_TRUE@ ./$(DEPDIR)/t rack.Po ./$(DEPDIR)/track_manager.Po \88 @AMDEP_TRUE@ ./$(DEPDIR)/ vector.Po ./$(DEPDIR)/world.Po \89 @AMDEP_TRUE@ ./$(DEPDIR)/world _entity.Po87 @AMDEP_TRUE@ ./$(DEPDIR)/skybox.Po ./$(DEPDIR)/story_entity.Po \ 88 @AMDEP_TRUE@ ./$(DEPDIR)/texture.Po ./$(DEPDIR)/track.Po \ 89 @AMDEP_TRUE@ ./$(DEPDIR)/track_manager.Po ./$(DEPDIR)/vector.Po \ 90 @AMDEP_TRUE@ ./$(DEPDIR)/world.Po ./$(DEPDIR)/world_entity.Po 90 91 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 91 92 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) … … 236 237 matrix.cc \ 237 238 curve.cc \ 238 glmenu_imagescreen.cc 239 glmenu_imagescreen.cc\ 240 skybox.cc 239 241 240 242 noinst_HEADERS = ability.h \ … … 277 279 curve.h \ 278 280 glmenu_imagescreen.h \ 279 debug.h 281 debug.h\ 282 skybox.h 280 283 281 284 EXTRA_DIST = orxonox.conf … … 381 384 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_node.Po@am__quote@ 382 385 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@ 386 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/skybox.Po@am__quote@ 383 387 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/story_entity.Po@am__quote@ 384 388 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@ -
orxonox/branches/dave/src/stdincl.h
r3365 r3407 26 26 #include <GL/gl.h> 27 27 #include <GL/glu.h> 28 28 29 #else 29 30 #include <SDL.h> -
orxonox/branches/dave/src/world.cc
r3406 r3407 28 28 #include "helper_parent.h" 29 29 #include "glmenu_imagescreen.h" 30 #include "skybox.h" 30 31 #include "importer/material.h" 31 32 … … 289 290 orx->getLocalInput()->bind (myPlayer); 290 291 292 // create skybox 293 294 this->skybox = new Skybox(); 295 291 296 // bind camera 292 297 this->localCamera = new Camera(this); … … 333 338 this->pathnodes[5] = Vector(30, 50, 0); 334 339 335 340 336 341 337 342 … … 371 376 372 377 // initialize debug coord system 373 //fog initialisation378 374 379 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); 380 383 381 384 382 … … 389 387 // Setting the illumination mode otherwise it is flat-shaded. 390 388 boden->setIllum(3); 391 389 390 //Initializing the Sky, and loading a Texture into it. 391 //GLUquadricObj *sphereObj=0; 392 //sphereObj=gluNewQuadric(); 393 //gluQuadricTexture(sphereObj,GL_TRUE); 394 395 396 Material* sky = new Material("Sky"); 397 sky->setDiffuseMap("../data/pictures/sky-replace.jpg"); 398 sky->setIllum(2); 399 400 401 402 392 403 objectList = glGenLists(1); 393 404 glNewList (objectList, GL_COMPILE); … … 451 462 } 452 463 453 int snowheight=13;464 454 465 for ( int i = 0; i<sizeX; i+=1) 455 466 for (int j = 0; j<sizeZ;j+=1) … … 464 475 a[2]=1.0; 465 476 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 466 /*if(height[i][j]<snowheight){ 467 a[0]=0; 468 a[1]=1.0-height[i][j]/10-.3; 469 a[2]=0; 470 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 471 } 472 else{ 473 a[0]=1.0; 474 a[1]=1.0; 475 a[2]=1.0; 476 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 477 478 }*/ 477 479 478 glNormal3f(normal_vectors[i][j].x, normal_vectors[i][j].y, normal_vectors[i][j].z); 480 479 glTexCoord2f(0.0f,0.0f); … … 482 481 glVertex3f(v1.x, v1.y, v1.z); 483 482 484 /* 485 if(height[i+1][j]<snowheight){ 486 a[0]=0; 487 a[1] =1.0-height[i+1][j]/10-.3; 488 a[2]=0; 489 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 490 } 491 else{ 492 a[0]=1.0; 493 a[1]=1.0; 494 a[2]=1.0; 495 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 496 }*/ 483 497 484 glNormal3f(normal_vectors[i+1][j].x, normal_vectors[i+1][j].y, normal_vectors[i+1][j].z); 498 485 glTexCoord2f(1.0f,0.0f); 499 486 //glTexCoord2f((float)(i+1.0)/(float)sizeX,(float)j/(float)sizeZ); 500 487 glVertex3f(v2.x, v2.y, v2.z); 501 /* 502 if(height[i+1][j+1]<snowheight){ 503 a[0]=0; 504 a[1] =1.0-height[i+1][j+1]/10-.3; 505 a[2]=0; 506 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 507 } 508 else{ 509 a[0]=1.0; 510 a[1]=1.0; 511 a[2]=1.0; 512 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 513 }*/ 488 514 489 glNormal3f(normal_vectors[i+1][j+1].x, normal_vectors[i+1][j+1].y, normal_vectors[i+1][j+1].z); 515 490 glTexCoord2f(1.0f,1.0f); 516 491 //glTexCoord2f((float)(i+1.0)/(float)sizeX,(float)(j+1.0)/(float)sizeZ); 517 492 glVertex3f(v3.x, v3.y, v3.z); 518 /* 519 if(height[i][j+1]<snowheight){ 520 a[0]=0; 521 a[1] =1.0-height[i+1][j+1]/10-.3; 522 a[2]=0; 523 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 524 } 525 else{ 526 a[0]=1.0; 527 a[1]=1.0; 528 a[2]=1.0; 529 glMaterialfv(GL_FRONT,GL_DIFFUSE,a); 530 }*/ 493 531 494 glNormal3f(normal_vectors[i][j+1].x, normal_vectors[i][j+1].y, normal_vectors[i][j+1].z); 532 495 glTexCoord2f(0.0f,1.0f); … … 541 504 glDisable(GL_TEXTURE_2D); 542 505 543 /* 544 glBegin(GL_LINES); 545 for( float x = -128.0; x < 128.0; x += 25.0) 546 { 547 for( float y = -128.0; y < 128.0; y += 25.0) 548 { 549 glColor3f(1,0,0); 550 glVertex3f(x,y,-128.0); 551 glVertex3f(x,y,0.0); 552 glColor3f(0.5,0,0); 553 glVertex3f(x,y,0.0); 554 glVertex3f(x,y,128.0); 555 } 556 } 557 for( float y = -128.0; y < 128.0; y += 25.0) 558 { 559 for( float z = -128.0; z < 128.0; z += 25.0) 560 { 561 glColor3f(0,1,0); 562 glVertex3f(-128.0,y,z); 563 glVertex3f(0.0,y,z); 564 glColor3f(0,0.5,0); 565 glVertex3f(0.0,y,z); 566 glVertex3f(128.0,y,z); 567 } 568 } 569 for( float x = -128.0; x < 128.0; x += 25.0) 570 { 571 for( float z = -128.0; z < 128.0; z += 25.0) 572 { 573 glColor3f(0,0,1); 574 glVertex3f(x,-128.0,z); 575 glVertex3f(x,0.0,z); 576 glColor3f(0,0,0.5); 577 glVertex3f(x,0.0,z); 578 glVertex3f(x,128.0,z); 579 } 580 581 } 582 */ 506 583 507 //draw track 584 508 glBegin(GL_LINES); … … 591 515 glEnd(); 592 516 593 /* 594 glBegin(GL_LINE_STRIP); 595 glColor3f(1.0, 5.0, 1.0); 596 for( int i = 0; i <= 30; i++) 597 { 598 glEvalCoord1f ((GLfloat) i/30.0); 599 } 600 glEnd(); 601 */ 517 602 518 603 519 trackManager->drawGraph(.01); … … 605 521 delete trackManager; 606 522 607 /* 608 glBegin(GL_LINES); 609 float i; 610 for(i = 0.0; i<1; i+=.01) 611 { 612 printf("%f, %f, %f\n",tmpCurve->calcPos(i).x, tmpCurve->calcPos(i).y, tmpCurve->calcPos(i).z); 613 glVertex3f(tmpCurve->calcPos(i).x, tmpCurve->calcPos(i).y, tmpCurve->calcPos(i).z); 614 } 615 glEnd(); 616 */ 617 glEndList(); 618 619 523 524 525 glEnable(GL_TEXTURE_2D); 526 sky->select(); 527 skybox->draw(); 528 529 glEndList(); 620 530 } 621 531 -
orxonox/branches/dave/src/world.h
r3405 r3407 10 10 #include "stdincl.h" 11 11 #include "story_entity.h" 12 #include "skybox.h" 12 13 class Material; 13 14 … … 85 86 86 87 WorldEntity* localPlayer; 88 Skybox* skybox; 87 89 88 90 PNode* nullParent;
Note: See TracChangeset
for help on using the changeset viewer.