X-Git-Url: http://git.mutantstargoat.com?a=blobdiff_plain;f=src%2Fmain.cc;h=4d0dd421ed59fdf201a74abcc6eea78f9f23c600;hb=72995482b98ff2a014ddd737131a0935ead89977;hp=6b1050b9e33cd32025b9616fc35dbf03d381e46d;hpb=0c5fa3525b2c8151bf83a215eee992c257d6fa28;p=demo diff --git a/src/main.cc b/src/main.cc index 6b1050b..4d0dd42 100644 --- a/src/main.cc +++ b/src/main.cc @@ -102,7 +102,7 @@ int main(int argc, char **argv) } //TODO - return 0; + //return 0; glfwSetKeyCallback(win, clbk_key); glfwSetCursorPosCallback(win, clbk_motion); @@ -264,12 +264,20 @@ static void clbk_key(GLFWwindow *win, int key, int scancode, int action, int mod break; // case 'F': - // fog_density = fog_density < 1 - 0.0009 ? fog_density + 0.0001 : 1; - // break; + // fog_density = fog_density < 1 - 0.0009 ? fog_density + 0.0001 : 1; + // break; // case 'U': - // fog_density = fog_density > 0.0001 ? fog_density - 0.0001 : 0; - // break; + // fog_density = fog_density > 0.0001 ? fog_density - 0.0001 : 0; + // break; + + case 'P': + gfx_wireframe(true); + break; + + case 'F': + gfx_wireframe(false); + break; default: break; @@ -318,6 +326,7 @@ static void clbk_mouse(GLFWwindow *win, int bn, int action, int mods) static void clbk_reshape(GLFWwindow *win, int width, int height) { + gfx_reshape(width, height); gfx_viewport(0, 0, width, height); aspect = (float)width / (float)height; mprojection = calc_projection_matrix(45, aspect, 0.5, 1000.0); @@ -388,4 +397,4 @@ static bool gen_poisson(std::vector &points, float min_dist, float radius) } } return false; -} \ No newline at end of file +}