History

fix to LOD bug caused by flip-flopped X and Z, add color randomization to inserted voxels on server, added head position display to display_stats()

ZappoMan committed 13 years ago

Commit 57829781 parent b017f9a4 files · +66 −14Browse files

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

Unified · Split

interface/src/main.cpp+6−3
@@ -98,6 +98,7 @@ Head myHead; // The rendered head of oneself · 97 unmodified lines
98 98
99char starFile[] = "https://s3-us-west-1.amazonaws.com/highfidelity/stars.txt";99char starFile[] = "https://s3-us-west-1.amazonaws.com/highfidelity/stars.txt";
100FieldOfView fov;100FieldOfView fov;
101
101Stars stars;102Stars stars;
102#ifdef STARFIELD_KEYS103#ifdef STARFIELD_KEYS
103int starsTiles = 20;104int starsTiles = 20;
@@ -255,10 +256,12 @@ void display_stats(void) · 151 unmodified lines
255 256
256 char legend2[] = "* - toggle stars, & - toggle paint mode";257 char legend2[] = "* - toggle stars, & - toggle paint mode";
257 drawtext(10, 32, 0.10f, 0, 1.0, 0, legend2);258 drawtext(10, 32, 0.10f, 0, 1.0, 0, legend2);
259
260 glm::vec3 headPos = myHead.getPos();
258 261
259 char stats[200];262 char stats[200];
260 sprintf(stats, "FPS = %3.0f Pkts/s = %d Bytes/s = %d ", 263 sprintf(stats, "FPS = %3.0f Pkts/s = %d Bytes/s = %d Head(x,y,z)=( %f , %f , %f )",
261 FPS, packets_per_second, bytes_per_second);264 FPS, packets_per_second, bytes_per_second, headPos.x,headPos.y,headPos.z);
262 drawtext(10, 49, 0.10f, 0, 1.0, 0, stats); 265 drawtext(10, 49, 0.10f, 0, 1.0, 0, stats);
263 if (serialPort.active) {266 if (serialPort.active) {
264 sprintf(stats, "ADC samples = %d, LED = %d", 267 sprintf(stats, "ADC samples = %d, LED = %d",
@@ -490,7 +493,7 @@ void simulateHead(float frametime) · 225 unmodified lines
490 char broadcast_string[MAX_BROADCAST_STRING];493 char broadcast_string[MAX_BROADCAST_STRING];
491 int broadcast_bytes = myHead.getBroadcastData(broadcast_string);494 int broadcast_bytes = myHead.getBroadcastData(broadcast_string);
492 agentList.broadcastToAgents(broadcast_string, broadcast_bytes,AgentList::AGENTS_OF_TYPE_VOXEL_AND_INTERFACE);495 agentList.broadcastToAgents(broadcast_string, broadcast_bytes,AgentList::AGENTS_OF_TYPE_VOXEL_AND_INTERFACE);
493 496
494 // If I'm in paint mode, send a voxel out to VOXEL server agents.497 // If I'm in paint mode, send a voxel out to VOXEL server agents.
495 if (::paintOn) {498 if (::paintOn) {
496 499