Using the following program, you are to add your own display function.
This display function will simply draw three lines of your choosing to
the screen.
UNIX VERSION (Windows Below)
| /*#####################################*/
/*Description: program to draw three red lines*/ /* to a GLUT window that is 500x500 pixels*/ /*Author: L. Grewe */ /* UNIX VERSION */ /*Date: 1-1-99 */ /*#####################################*/ #include <GL/gl.h>
#include <stdio.h>
/*Function prototypes*/
void main(int argc, char **argv)
glutInit(&argc,argv); /*init. GLUT window sys.*/ /*there will be
a single buffered window displaying RGB */
glutInitWindowSize(500,500);
/*size in pixels */
/*Create the window
using the setup from the previous glut calls*/
/*tell system what
function will be in charge of displaying*/
/*Call another function
to further initialize window contents*/
/*this call causes
to go in infinite loop waiting for window i/o */
}
/*#####################################*/
/*white background
*/
/*drawing color
red */
/*Viewing Configuration
*/
/*Shift to Model Specification
Model */
|
Windows VERSION
| /*#####################################*/
/*Description: program to draw three red lines*/ /* to a GLUT window that is 500x500 pixels*/ /*Author: L. Grewe */ /* Windows VERSION */ /*Date: 1-1-99 */ /*#####################################*/ #include <windows.h> #include <GL\Gl.h>
#include <stdio.h>
/*Function prototypes*/
void main(int argc, char **argv)
glutInit(&argc,argv); /*init. GLUT window sys.*/ /*there will be
a single buffered window displaying RGB */
glutInitWindowSize(500,500);
/*size in pixels */
/*Create the window
using the setup from the previous glut calls*/
/*tell system what
function will be in charge of displaying*/
/*Call another function
to further initialize window contents*/
/*this call causes
to go in infinite loop waiting for window i/o */
}
/*#####################################*/
/*white background
*/
/*drawing color
red */
/*Viewing Configuration
*/
/*Shift to Model Specification
Model */
|