hide the cursor in fullscreen
[censuslogo] / src / main.c
index 23b9878..b5e1f5e 100644 (file)
@@ -48,6 +48,7 @@ int main(int argc, char **argv)
 
        if(fullscr) {
                glutFullScreen();
+               glutSetCursor(GLUT_CURSOR_NONE);
        }
 
        glutDisplayFunc(display);
@@ -103,8 +104,8 @@ static void draw_line(float x0, float y0, float x1, float y1, float rad)
        rx = rad * dy / len;
        ry = -rad * dx / len;
 
-       draw_disc(x0, y0, rad, 8);
-       draw_disc(x1, y1, rad, 8);
+       draw_disc(x0, y0, rad, 12);
+       draw_disc(x1, y1, rad, 12);
 
        glBegin(GL_QUADS);
        glVertex2f(x0 + rx, y0 + ry);
@@ -114,7 +115,7 @@ static void draw_line(float x0, float y0, float x1, float y1, float rad)
        glEnd();
 }
 
-#define LOOPTIME       1.3f
+#define LOOPTIME       1.45f
 
 void display(void)
 {
@@ -129,7 +130,7 @@ void display(void)
        glLineWidth(5.0);
 
        anim = fmod(t / 6.0f, LOOPTIME);
-       alpha = 1.0f - ((anim - (LOOPTIME - 0.2)) / 0.2f);
+       alpha = 1.0f - ((anim - (LOOPTIME - 0.075)) / 0.06f);
        if(alpha < 0.0f) alpha = 0.0f;
        if(alpha > 1.0f) alpha = 1.0f;
 
@@ -146,18 +147,18 @@ void display(void)
 
        if(anim > 0.0f) {
                eval_logo(a, 0);
-               draw_disc(a[0], a[1], 0.05, 18);
+               draw_disc(a[0], a[1], 0.05, 22);
        }
        if(anim >= 1.0f) {
                eval_logo(b, 1);
-               draw_disc(b[0], b[1], 0.05, 18);
+               draw_disc(b[0], b[1], 0.05, 22);
        }
 
        glEnable(GL_BLEND);
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
        glColor4f(0.8, 0, 0, 2.0 * (anim - 1.0f) / (LOOPTIME - 1.0f));
-       draw_disc(0, 0, 0.14, 24);
+       draw_disc(0, 0, 0.14, 30);
 
        if(alpha < 1.0f) {
                glBegin(GL_QUADS);
@@ -218,8 +219,10 @@ void keyb(unsigned char key, int x, int y)
                        saved_width = win_width;
                        saved_height = win_height;
                        glutFullScreen();
+                       glutSetCursor(GLUT_CURSOR_NONE);
                } else {
                        glutReshapeWindow(saved_width, saved_height);
+                       glutSetCursor(GLUT_CURSOR_INHERIT);
                }
                break;
        }