Commit d5718a1bc6c0a18e763d319bbd70d7d22452da8f

Authored by David Mayerich
1 parent 59afc4f3

fixed casting warnings

Showing 1 changed file with 11 additions and 11 deletions   Show diff stats
@@ -29,8 +29,8 @@ stim::camera cam; // camera object @@ -29,8 +29,8 @@ stim::camera cam; // camera object
29 29
30 // overall parameters 30 // overall parameters
31 unsigned num_nets = 0; // number of networks that've been loaded 31 unsigned num_nets = 0; // number of networks that've been loaded
32 -float sigma = 3.0; // default sigma(resample rate) equals to 3.0  
33 -float radius = 0.7; // equals to radius 32 +float sigma = 3.0f; // default sigma(resample rate) equals to 3.0
  33 +float radius = 0.7f; // equals to radius
34 float delta; // camera moving parameter 34 float delta; // camera moving parameter
35 35
36 // networks 36 // networks
@@ -296,13 +296,13 @@ void glut_render(void) { @@ -296,13 +296,13 @@ void glut_render(void) {
296 stim::vec3<float> p2 = cam.getPosition(); 296 stim::vec3<float> p2 = cam.getPosition();
297 297
298 // light 298 // light
299 - GLfloat global_ambient[] = { 0.5, 0.5, 0.5, 1.0 };  
300 - GLfloat ambient[] = { 0.0, 0.0, 0.0, 1.0 };  
301 - GLfloat diffuse1[] = { 1.0, 1.0, 1.0, 1.0 };  
302 - GLfloat diffuse2[] = { 0.4, 0.4, 0.4, 1.0 };  
303 - GLfloat specular[] = { 1.0, 1.0, 1.0, 1.0 };  
304 - GLfloat position1[] = { p1[0], p1[1], p1[2], 1.0 }; // upper right light source  
305 - GLfloat position2[] = { p2[0], p2[1], p2[2], 1.0 }; // lower left light source 299 + GLfloat global_ambient[] = { 0.5f, 0.5f, 0.5f, 1.0f };
  300 + GLfloat ambient[] = { 0.0f, 0.0f, 0.0f, 1.0f };
  301 + GLfloat diffuse1[] = { 1.0f, 1.0f, 1.0f, 1.0f };
  302 + GLfloat diffuse2[] = { 0.4f, 0.4f, 0.4f, 1.0f };
  303 + GLfloat specular[] = { 1.0f, 1.0f, 1.0f, 1.0f };
  304 + GLfloat position1[] = { p1[0], p1[1], p1[2], 1.0f }; // upper right light source
  305 + GLfloat position2[] = { p2[0], p2[1], p2[2], 1.0f }; // lower left light source
306 306
307 glClearColor(0.0, 0.0, 0.0, 1.0); 307 glClearColor(0.0, 0.0, 0.0, 1.0);
308 glShadeModel(GL_SMOOTH); 308 glShadeModel(GL_SMOOTH);
@@ -524,7 +524,7 @@ void glut_render(void) { @@ -524,7 +524,7 @@ void glut_render(void) {
524 int Y = glutGet(GLUT_WINDOW_HEIGHT); // get the current window height 524 int Y = glutGet(GLUT_WINDOW_HEIGHT); // get the current window height
525 glViewport(0, 0, X / 2, Y); // locate to left bottom corner 525 glViewport(0, 0, X / 2, Y); // locate to left bottom corner
526 gluOrtho2D(0, X, 0, Y); // define othogonal aspect 526 gluOrtho2D(0, X, 0, Y); // define othogonal aspect
527 - glColor3f(0.8, 0.0, 0.0); // using red to show mode 527 + glColor3f(0.8f, 0.0f, 0.0f); // using red to show mode
528 528
529 glMatrixMode(GL_MODELVIEW); 529 glMatrixMode(GL_MODELVIEW);
530 glPushMatrix(); 530 glPushMatrix();
@@ -972,7 +972,7 @@ int main(int argc, char* argv[]) @@ -972,7 +972,7 @@ int main(int argc, char* argv[])
972 GT = GT.resample(resample_rate * sigma); // resample both networks based on the sigma value 972 GT = GT.resample(resample_rate * sigma); // resample both networks based on the sigma value
973 T = T.resample(resample_rate * sigma); 973 T = T.resample(resample_rate * sigma);
974 if (args["mapping"].is_set()) { 974 if (args["mapping"].is_set()) {
975 - float threshold = args["mapping"].as_float(); 975 + float threshold = (float)args["mapping"].as_float();
976 mapping(sigma, device, threshold); 976 mapping(sigma, device, threshold);
977 } 977 }
978 else 978 else