diff --git a/main.cu b/main.cu index 493ab06..fcaab35 100644 --- a/main.cu +++ b/main.cu @@ -29,8 +29,8 @@ stim::camera cam; // camera object // overall parameters unsigned num_nets = 0; // number of networks that've been loaded -float sigma = 3.0; // default sigma(resample rate) equals to 3.0 -float radius = 0.7; // equals to radius +float sigma = 3.0f; // default sigma(resample rate) equals to 3.0 +float radius = 0.7f; // equals to radius float delta; // camera moving parameter // networks @@ -296,13 +296,13 @@ void glut_render(void) { stim::vec3 p2 = cam.getPosition(); // light - GLfloat global_ambient[] = { 0.5, 0.5, 0.5, 1.0 }; - GLfloat ambient[] = { 0.0, 0.0, 0.0, 1.0 }; - GLfloat diffuse1[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat diffuse2[] = { 0.4, 0.4, 0.4, 1.0 }; - GLfloat specular[] = { 1.0, 1.0, 1.0, 1.0 }; - GLfloat position1[] = { p1[0], p1[1], p1[2], 1.0 }; // upper right light source - GLfloat position2[] = { p2[0], p2[1], p2[2], 1.0 }; // lower left light source + GLfloat global_ambient[] = { 0.5f, 0.5f, 0.5f, 1.0f }; + GLfloat ambient[] = { 0.0f, 0.0f, 0.0f, 1.0f }; + GLfloat diffuse1[] = { 1.0f, 1.0f, 1.0f, 1.0f }; + GLfloat diffuse2[] = { 0.4f, 0.4f, 0.4f, 1.0f }; + GLfloat specular[] = { 1.0f, 1.0f, 1.0f, 1.0f }; + GLfloat position1[] = { p1[0], p1[1], p1[2], 1.0f }; // upper right light source + GLfloat position2[] = { p2[0], p2[1], p2[2], 1.0f }; // lower left light source glClearColor(0.0, 0.0, 0.0, 1.0); glShadeModel(GL_SMOOTH); @@ -524,7 +524,7 @@ void glut_render(void) { int Y = glutGet(GLUT_WINDOW_HEIGHT); // get the current window height glViewport(0, 0, X / 2, Y); // locate to left bottom corner gluOrtho2D(0, X, 0, Y); // define othogonal aspect - glColor3f(0.8, 0.0, 0.0); // using red to show mode + glColor3f(0.8f, 0.0f, 0.0f); // using red to show mode glMatrixMode(GL_MODELVIEW); glPushMatrix(); @@ -972,7 +972,7 @@ int main(int argc, char* argv[]) GT = GT.resample(resample_rate * sigma); // resample both networks based on the sigma value T = T.resample(resample_rate * sigma); if (args["mapping"].is_set()) { - float threshold = args["mapping"].as_float(); + float threshold = (float)args["mapping"].as_float(); mapping(sigma, device, threshold); } else -- libgit2 0.21.4