- 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);
-
- glNormal3f( 0.0F, 1.0F, 0.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,-1.0F, 0.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( 1.0F, 0.0F, 0.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(-1.0F, 0.0F, 0.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);
- glEnd();
-
- glEndList();
- }
- else
- glCallList( m_gllist );
+ 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);
+
+ glNormal3f( 0.0f, 1.0f, 0.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,-1.0f, 0.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( 1.0f, 0.0f, 0.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(-1.0f, 0.0f, 0.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);
+ glEnd();
+
+ glEndList();
+ }
+ else
+ {
+ glCallList(m_gllist);
+ }