Pages

Wednesday, March 2, 2011

/**
 * This snippet of code will change your background color from
 * pure of black to pure of white when your drag has been reached
 * 1000 event. This event will invoked when you drag your mouse button
 */

void motion(int x, int y){
    static float i = 0;
    glClearColor(i/1000, i/1000, i/1000, 1.0);
    glutPostRedisplay();
    i++;
}

No comments:

Post a Comment