Few more bits of cleanup and variable renaming, turned voxel rendering back on by default

This commit is contained in:
Philip Rosedale 2013-04-10 12:43:26 -07:00
parent f26f9546b7
commit 8010129774
3 changed files with 8 additions and 24 deletions

View file

@ -46,7 +46,7 @@ Cloud::Cloud(int num,
void Cloud::render() {
float particle_attenuation_quadratic[] = { 0.0f, 0.0f, 2.0f };
float particleAttenuationQuadratic[] = { 0.0f, 0.0f, 2.0f };
glEnable( GL_TEXTURE_2D );
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
@ -57,7 +57,7 @@ void Cloud::render() {
glPointSize( maxSize );
glPointParameterfvARB( GL_POINT_DISTANCE_ATTENUATION_ARB, particle_attenuation_quadratic );
glPointParameterfvARB( GL_POINT_DISTANCE_ATTENUATION_ARB, particleAttenuationQuadratic );
glPointParameterfARB( GL_POINT_SIZE_MAX_ARB, maxSize );
glPointParameterfARB( GL_POINT_SIZE_MIN_ARB, 0.001f );

View file

@ -46,9 +46,9 @@ void render_vector(glm::vec3 * vec)
glVertex3f(vec->x, vec->y, vec->z);
// Draw marker dots for magnitude
glEnd();
float particle_attenuation_quadratic[] = { 0.0f, 0.0f, 2.0f }; // larger Z = smaller particles
float particleAttenuationQuadratic[] = { 0.0f, 0.0f, 2.0f }; // larger Z = smaller particles
glPointParameterfvARB( GL_POINT_DISTANCE_ATTENUATION_ARB, particle_attenuation_quadratic );
glPointParameterfvARB( GL_POINT_DISTANCE_ATTENUATION_ARB, particleAttenuationQuadratic );
glEnable(GL_POINT_SMOOTH);
glPointSize(10.0);

View file

@ -108,7 +108,7 @@ int starsTiles = 20;
double starsLod = 1.0;
#endif
bool showingVoxels = false;
bool showingVoxels = true;
glm::vec3 box(WORLD_SIZE,WORLD_SIZE,WORLD_SIZE);
@ -120,7 +120,7 @@ ParticleSystem balls(0,
0.0 // Gravity
);
Cloud cloud(0, // Particles
Cloud cloud(0, // Particles
box, // Bounding Box
false // Wrap
);
@ -177,10 +177,8 @@ SerialInterface serialPort;
int latency_display = 1;
glm::vec3 gravity;
int first_measurement = 1;
//int samplecount = 0;
// Frame rate Measurement
// Frame Rate Measurement
int frameCount = 0;
float FPS = 120.f;
@ -188,12 +186,6 @@ timeval timerStart, timerEnd;
timeval lastTimeIdle;
double elapsedTime;
// Particles
float particle_attenuation_quadratic[] = { 0.0f, 0.0f, 2.0f }; // larger Z = smaller particles
float pointer_attenuation_quadratic[] = { 1.0f, 0.0f, 0.0f }; // for 2D view
#ifdef MARKER_CAPTURE
/*** Marker Capture ***/
@ -253,14 +245,6 @@ void displayStats(void)
drawtext(300, 30, 0.10f, 0, 1.0, 0, stats);
}
// Output the ping times to the various agents
// std::stringstream pingTimes;
// pingTimes << "Agent Pings, msecs:";
// for (int i = 0; i < getAgentCount(); i++) {
// pingTimes << " " << getAgentAddress(i) << ": " << getAgentPing(i);
// }
// drawtext(10,50,0.10, 0, 1.0, 0, (char *)pingTimes.str().c_str());
std::stringstream voxelStats;
voxelStats << "Voxels Rendered: " << voxels.getVoxelsRendered();
drawtext(10,70,0.10f, 0, 1.0, 0, (char *)voxelStats.str().c_str());
@ -826,7 +810,7 @@ void display(void)
//drawvec3(100, 100, 0.15, 0, 1.0, 0, myHead.getPos(), 0, 1, 0);
glPointParameterfvARB( GL_POINT_DISTANCE_ATTENUATION_ARB, pointer_attenuation_quadratic );
//glPointParameterfvARB( GL_POINT_DISTANCE_ATTENUATION_ARB, pointer_attenuation_quadratic );
if (displayHeadMouse && !displayHead && statsOn)
{