+clb_reshape(GLFWwindow *win,
+ int width,
+ int height)
+{
+}
+
+static double prev_x, prev_y;
+static bool button[8];
+
+static void
+clb_motion(GLFWwindow *win,
+ double x,
+ double y)
+{
+ double dx = x - prev_x;
+ double dy = y - prev_y;
+
+ prev_x = x;
+ prev_y = y;
+
+ if(button[0]) {
+ cam_theta += dx * 0.5;
+ cam_phi += dy * 0.5;
+
+ if(cam_phi < 0)
+ cam_phi = 0;
+ if(cam_phi > 90)
+ cam_phi = 90;
+ }
+
+ if(button[1]) {
+ cam_dist += dy * 0.1;
+ if(cam_dist < 0.0) {
+ cam_dist = 0.0;
+ }
+ }
+}
+
+static void
+clb_mouse(GLFWwindow *win,
+ int button,
+ int action,
+ int mods)