Professional Documents
Culture Documents
1
1
cpp
* Author :
* Email :
* Course : Computer Graphics
*
* Description :
*
*
* Date :
*
* History:
* Revision Date Changed By
* -------- ---------- ----------
* 01.00 ????? ???
* First release.
*
*/
};
/* ----------------------------------------------------------------------- */
/* Function : void drawDot( GLint x, GLint y )
*
* Description : Draw a point at location (x, y) in the window.
*
* Parameters : GLint x : X coordinate of point to draw.
* GLint y : X coordinate of point to draw.
*
* Returns : void
*/
/* ----------------------------------------------------------------------- */
/* Function : void myInit( void )
*
* Description : Initialize OpenGL and the window where things will be
* drawn.
*
* Parameters : void
*
* Returns : void
*/
void myInit( void ) {
glClearColor( 1.0, 1.0, 1.0, 0.0 );
glColor3f( 0.0, 0.0, 0.0 );
glPointSize( 1.0 );
glMatrixMode( GL_PROJECTION );
glLoadIdentity( );
gluOrtho2D( 0.0, 640.0, 0.0, 480.0 );
}
/* ----------------------------------------------------------------------- */
/* Function : void myDisplay( void )
*
* Description : This function gets called everytime the window needs to
* be redrawn.
*
* Parameters : void
*
* Returns : void
*/
/* ----------------------------------------------------------------------- */
/* Function : int main( int argc, char** argv )
*
* Description : This is the main function. It sets up the rendering
* context, and then reacts to user events.
*
* Parameters : int argc : Number of command-line arguments.
* char *argv[] : Array of command-line arguments.
*
* Returns : int : Return code to pass to the shell.
*/
/* ----------------------------------------------------------------------- */