- glFrustum(-0.5F, 0.5F, -0.5F, 0.5F, 1.0F, 3.0F);
- glMatrixMode(GL_MODELVIEW);
-
- /* clear color and depth buffers */
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- if( m_gllist == 0 )
- {
- m_gllist = glGenLists( 1 );
- glNewList( m_gllist, GL_COMPILE_AND_EXECUTE );
- /* draw six faces of a cube */
- glBegin(GL_QUADS);
- glNormal3f( 0.0F, 0.0F, 1.0F);
- glVertex3f( 0.5F, 0.5F, 0.5F); glVertex3f(-0.5F, 0.5F, 0.5F);
- glVertex3f(-0.5F,-0.5F, 0.5F); glVertex3f( 0.5F,-0.5F, 0.5F);
-
- glNormal3f( 0.0F, 0.0F,-1.0F);
- glVertex3f(-0.5F,-0.5F,-0.5F); glVertex3f(-0.5F, 0.5F,-0.5F);
- glVertex3f( 0.5F, 0.5F,-0.5F); glVertex3f( 0.5F,-0.5F,-0.5F);