void CDrawChangeGroup::displayEvent() { CLearnOpenGLBase::displayEvent(); if (g_drawEarth) { drawEarth(); } else { drawRobotArm(); } glutSwapBuffers(); }
bool RobotArm::Initialize(void) { if (!initialized) { display_list = glGenLists(1); } // Now do the geometry. Create the display list for drawing a robot glNewList(display_list, GL_COMPILE); drawRobotArm(); glEndList(); // We only do all this stuff once, when the GL context is first set up. initialized = true; return true; }