/******************************************************** * class cContainer implementation * * end of class cFrame implementation * ********************************************************/ void TSRGuiContainer::Render() { if ( !m_bVisible ) { return; } TSRGlobalConstants.PushMatrix(); TSRGlobalConstants.Translate( m_Position.x, m_Position.y, 0.0f ); RenderBody(); if ( m_bBordered ) { TSRMaterial material; material.m_vDiffuseColor.Assign( m_BorderColor.r, m_BorderColor.g, m_BorderColor.b, 1.0f ); TSRGlobalConstants.SetMaterial( material ); Graphics()->m_pSimpleShader->Activate(); m_pBorderMesh->Render(); } for ( unsigned int i = 0; i < m_Children.size(); i++ ) { m_Children[ i ]->Render(); } TSRGlobalConstants.PopMatrix(); RenderText( m_Text.c_str() ); // set rasterization position }
CQTOpenGLEPuck::CQTOpenGLEPuck() : m_unVertices(40), m_fLEDAngleSlice(360.0f / 8.0f) { /* Reserve the needed display lists */ m_unLists = glGenLists(4); /* Assign indices for better referencing (later) */ m_unWheelList = m_unLists; m_unChassisList = m_unLists + 1; m_unBodyList = m_unLists + 2; m_unLEDList = m_unLists + 3; /* Create the wheel display list */ glNewList(m_unWheelList, GL_COMPILE); RenderWheel(); glEndList(); /* Create the body display list */ glNewList(m_unBodyList, GL_COMPILE); RenderBody(); glEndList(); /* Create the chassis display list */ glNewList(m_unChassisList, GL_COMPILE); RenderChassis(); glEndList(); /* Create the LED display list */ glNewList(m_unLEDList, GL_COMPILE); RenderLED(); glEndList(); }