History

Merge remote-tracking branch 'origin'

Philip Rosedale committed 13 years ago

Commit 7edd93f2 parents ef785ba 1b833fb3 files · +69 −47Browse files

Showing the changes to interface/src/main.cpp (1 of 3 files). Show all

Unified · Split

interface/src/main.cpp+28−5
@@ -108,6 +108,8 @@ int starsTiles = 20; · 107 unmodified lines
108108 double starsLod = 1.0;
109109 #endif
110110
111+bool showingVoxels = false;
112+
111113 glm::vec3 box(WORLD_SIZE,WORLD_SIZE,WORLD_SIZE);
112114
113115 ParticleSystem balls(0,
@@ -511,6 +513,8 @@ void simulateHead(float frametime) · 397 unmodified lines
511513
512514 void display(void)
513515 {
516+ //printf( "avatar head lookat = %f, %f, %f\n", myHead.getAvatarHeadLookatDirection().x, myHead.getAvatarHeadLookatDirection().y, myHead.getAvatarHeadLookatDirection().z );
517+
514518 PerfStat("display");
515519
516520 glEnable(GL_LINE_SMOOTH);
@@ -560,7 +564,7 @@ void display(void) · 43 unmodified lines
560564 // set the camera to third-person view behind my av
561565 //----------------------------------------------------
562566 myCamera.setYaw ( 180.0 - myHead.getAvatarYaw() );
563− myCamera.setPitch ( 10.0 );
567+ myCamera.setPitch ( 0.0 );
564568 myCamera.setRoll ( 0.0 );
565569 myCamera.setUp ( 0.2 );
566570 myCamera.setDistance( 1.6 );
@@ -584,17 +588,34 @@ void display(void) · 17 unmodified lines
584588 glEnable(GL_LIGHTING);
585589 glEnable(GL_DEPTH_TEST);
586590
591+
592+ //---------------------------------------------
593+ // draw a red sphere
594+ //---------------------------------------------
595+ float sphereRadius = 0.25f;
587596 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+
590608 // Draw cloud of dots
591609 glDisable( GL_POINT_SPRITE_ARB );
592610 glDisable( GL_TEXTURE_2D );
593611 if (!displayHead) cloud.render();
594612
595613 // Draw voxels
596− voxels.render();
597−
614+ if ( showingVoxels )
615+ {
616+ voxels.render();
617+ }
618+
598619 // Draw field vectors
599620 if (displayField) field.render();
600621
@@ -1062,6 +1083,8 @@ void audioMixerUpdate(in_addr_t newMixerAddress, in_port_t newMixerPort) { · 461 unmodified lines
10621083 }
10631084 #endif
10641085
1086+
1087+
10651088 int main(int argc, const char * argv[])
10661089 {
10671090 const char* domainIP = getCmdOption(argc, argv, "--domain");