Pages

Wednesday, March 2, 2011

OpenGL - Between Red and Blue

void motion(int x, int y){
    float xx  = (x/400.00);        // must be float divider
    float yy = (y/300.00);         // must be float divider
    glClearColor(xx, 0.0, yy, 1.0);
    glutPostRedisplay();
}

No comments:

Post a Comment