PDA

View Full Version : Opengl with animation to shapes



jasmine
10-13-2016, 02:00 PM
void processSpecialKeys(int key, int x, int y)
{

if (key == GLUT_KEY_UP)
{
// increase the size

}
else if (key == GLUT_KEY_DOWN)
{
// decrease the size
}

}
void processNormalKeys (unsigned char key, int x, int y)
{

if (key == 'R' || key == 'r') // reset all
{
// clear everything
}
else if (key == 27)
exit (0);
}

How am I able to increase the size and decrease and also clear everything, do I need a for loop?

Dark Photon
10-13-2016, 04:54 PM
So I'm seeing all the:

// do it yourself

comments in here. If this is homework, please read The Forum Posting Guidelines (https://www.opengl.org/discussion_boards/showthread.php/176139-Forum-Posting-Guidelines).