The InitInstance function of my program creates a window using glutCreateWindow, then calls glutDisplayFunc to call a callback function named “MyPaint” which draws a white square inside the window.
I want to be able to redraw anything inside the window, including the square and perhaps make it blue in color.
How do I do this? My existing code in InitInstance looks like this:
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow (“CDTI Display”);
// draws a white
glutMainLoop(); return TRUE;
Any help is deeply appreciated.