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 29  
30 30 // overall parameters
31 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 34 float delta; // camera moving parameter
35 35  
36 36 // networks
... ... @@ -296,13 +296,13 @@ void glut_render(void) {
296 296 stim::vec3<float> p2 = cam.getPosition();
297 297  
298 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 307 glClearColor(0.0, 0.0, 0.0, 1.0);
308 308 glShadeModel(GL_SMOOTH);
... ... @@ -524,7 +524,7 @@ void glut_render(void) {
524 524 int Y = glutGet(GLUT_WINDOW_HEIGHT); // get the current window height
525 525 glViewport(0, 0, X / 2, Y); // locate to left bottom corner
526 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 529 glMatrixMode(GL_MODELVIEW);
530 530 glPushMatrix();
... ... @@ -972,7 +972,7 @@ int main(int argc, char* argv[])
972 972 GT = GT.resample(resample_rate * sigma); // resample both networks based on the sigma value
973 973 T = T.resample(resample_rate * sigma);
974 974 if (args["mapping"].is_set()) {
975   - float threshold = args["mapping"].as_float();
  975 + float threshold = (float)args["mapping"].as_float();
976 976 mapping(sigma, device, threshold);
977 977 }
978 978 else
... ...