Showing the changes to interface/src/main.cpp (1 of 3 files). Show all
Unified · Split
| @@ -108,6 +108,8 @@ int starsTiles = 20; · 107 unmodified lines | ||
| 108 | 108 | double starsLod = 1.0; |
| 109 | 109 | #endif |
| 110 | 110 | |
| 111 | +bool showingVoxels = false; | |
| 112 | + | |
| 111 | 113 | glm::vec3 box(WORLD_SIZE,WORLD_SIZE,WORLD_SIZE); |
| 112 | 114 | |
| 113 | 115 | ParticleSystem balls(0, |
| @@ -511,6 +513,8 @@ void simulateHead(float frametime) · 397 unmodified lines | ||
| 511 | 513 | |
| 512 | 514 | void display(void) |
| 513 | 515 | { |
| 516 | + //printf( "avatar head lookat = %f, %f, %f\n", myHead.getAvatarHeadLookatDirection().x, myHead.getAvatarHeadLookatDirection().y, myHead.getAvatarHeadLookatDirection().z ); | |
| 517 | + | |
| 514 | 518 | PerfStat("display"); |
| 515 | 519 | |
| 516 | 520 | glEnable(GL_LINE_SMOOTH); |
| @@ -560,7 +564,7 @@ void display(void) · 43 unmodified lines | ||
| 560 | 564 | // set the camera to third-person view behind my av |
| 561 | 565 | //---------------------------------------------------- |
| 562 | 566 | myCamera.setYaw ( 180.0 - myHead.getAvatarYaw() ); |
| 563 | − myCamera.setPitch ( 10.0 ); | |
| 567 | + myCamera.setPitch ( 0.0 ); | |
| 564 | 568 | myCamera.setRoll ( 0.0 ); |
| 565 | 569 | myCamera.setUp ( 0.2 ); |
| 566 | 570 | myCamera.setDistance( 1.6 ); |
| @@ -584,17 +588,34 @@ void display(void) · 17 unmodified lines | ||
| 584 | 588 | glEnable(GL_LIGHTING); |
| 585 | 589 | glEnable(GL_DEPTH_TEST); |
| 586 | 590 | |
| 591 | + | |
| 592 | + //--------------------------------------------- | |
| 593 | + // draw a red sphere | |
| 594 | + //--------------------------------------------- | |
| 595 | + float sphereRadius = 0.25f; | |
| 587 | 596 | glColor3f(1,0,0); |
| 588 | − glutSolidSphere(0.25, 15, 15); | |
| 589 | − | |
| 597 | + glPushMatrix(); | |
| 598 | + glTranslatef( 0.0f, sphereRadius, 0.0f ); | |
| 599 | + glutSolidSphere( sphereRadius, 15, 15 ); | |
| 600 | + glPopMatrix(); | |
| 601 | + | |
| 602 | + //--------------------------------------------- | |
| 603 | + // draw a grid gound plane.... | |
| 604 | + //--------------------------------------------- | |
| 605 | + drawGroundPlaneGrid( 5.0f, 9 ); | |
| 606 | + | |
| 607 | + | |
| 590 | 608 | // Draw cloud of dots |
| 591 | 609 | glDisable( GL_POINT_SPRITE_ARB ); |
| 592 | 610 | glDisable( GL_TEXTURE_2D ); |
| 593 | 611 | if (!displayHead) cloud.render(); |
| 594 | 612 | |
| 595 | 613 | // Draw voxels |
| 596 | − voxels.render(); | |
| 597 | − | |
| 614 | + if ( showingVoxels ) | |
| 615 | + { | |
| 616 | + voxels.render(); | |
| 617 | + } | |
| 618 | + | |
| 598 | 619 | // Draw field vectors |
| 599 | 620 | if (displayField) field.render(); |
| 600 | 621 | |
| @@ -1062,6 +1083,8 @@ void audioMixerUpdate(in_addr_t newMixerAddress, in_port_t newMixerPort) { · 461 unmodified lines | ||
| 1062 | 1083 | } |
| 1063 | 1084 | #endif |
| 1064 | 1085 | |
| 1086 | + | |
| 1087 | + | |
| 1065 | 1088 | int main(int argc, const char * argv[]) |
| 1066 | 1089 | { |
| 1067 | 1090 | const char* domainIP = getCmdOption(argc, argv, "--domain"); |