How is possible to update a window in OpenGL? I mean: if a create a window with a figure and I visualize it, then I want through a transformation to modify the figure. I would like that by pressing a button from keyboard my window could be updated with the transfromed figure. What I do insert between "cin" and glutDisplayFunc(display) (look the followinfg pseudo-code)?
int main(int argc, char** argv){
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize (500, 500);
glutInitWindowPosition (100, 100);
glutCreateWindow (argv[0]);
init ();
glutDisplayFunc(display);
cin>>input_for_transformation;
glutReshapeFunc(reshape);
glutKeyboardFunc (keyboard);
glutMainLoop();
return 0;
}