History

Merge remote-tracking branch 'upstream/master'

Philip Rosedale committed 13 years ago

Commit ddc97a62 parents 76c5a74 77750a614 files · +129 −9Browse files

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

Unified · Split

interface/src/main.cpp+9−1
@@ -78,6 +78,7 @@ · 77 unmodified lines
7878
7979 #include "ViewFrustum.h"
8080 #include "HandControl.h"
81+#include "AvatarRenderer.h"
8182
8283 using namespace std;
8384
@@ -115,6 +116,8 @@ Avatar myAvatar(true); // The rendered avatar of oneself · 31 unmodified lines
115116 Camera myCamera; // My view onto the world (sometimes on myself :)
116117 Camera viewFrustumOffsetCamera; // The camera we use to sometimes show the view frustum from an offset mode
117118
119+AvatarRenderer avatarRenderer;
120+
118121 // Starfield information
119122 char starFile[] = "https://s3-us-west-1.amazonaws.com/highfidelity/stars.txt";
120123 char starCacheFile[] = "cachedStars.txt";
@@ -1710,6 +1713,7 @@ void idle(void) { · 1589 unmodified lines
17101713 handControl.stop();
17111714 }
17121715
1716+ // Read serial port interface devices
17131717 if (serialPort.active && USING_INVENSENSE_MPU9150) {
17141718 serialPort.readData();
17151719 }
@@ -1735,7 +1739,11 @@ void idle(void) { · 19 unmodified lines
17351739
17361740 myAvatar.setGravity(getGravity(myAvatar.getPosition()));
17371741 myAvatar.simulate(deltaTime);
1738−
1742+
1743+ // Update audio stats for procedural sounds
1744+ audio.setLastAcceleration(myAvatar.getThrust());
1745+ audio.setLastVelocity(myAvatar.getVelocity());
1746+
17391747 glutPostRedisplay();
17401748 lastTimeIdle = check;
17411749 }