void display(void) { lPosition(); /////////////////////////////////////////////////////////////////////////////////////////////////////// glClear (GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); glColor3f (1.0, 1.0, 1.0); glTexGeni(GL_S,GL_TEXTURE_GEN_MODE,GL_OBJECT_LINEAR); //Texturing Contour Anchored To The Object glTexGeni(GL_T,GL_TEXTURE_GEN_MODE,GL_OBJECT_LINEAR); //Texturing Contour Anchored To The Object //glEnable(GL_TEXTURE_GEN_S); //Auto Texture Generation //glEnable(GL_TEXTURE_GEN_T); //Auto Texture Generation glEnable(GL_TEXTURE_2D); /////////////////////////////////////////////////////////////////////////////////////////////////////// stars(); //glBindTexture(GL_TEXTURE_2D, g_cactus[1]); //gluSphere(g_text,0.4,48,48); stars(); sun(); adam(); hesper(); earth(); mars(); jupiter(); saturn(); uranus(); neptune(); /////////////////////////////////////////////////////////////////////////////////////////////////////// glDisable(GL_TEXTURE_2D); //glDisable(GL_TEXTURE_GEN_S); //Auto Texture Generation //glDisable(GL_TEXTURE_GEN_T); glutSwapBuffers(); }
void EveGGApp::Initialize() { SDL_WM_SetCaption("Eve SDL GG App", "Eve SDL GG App"); std::istringstream eve( "layout alert_dialog\n" "{\n" " view dialog(name: 'Alert', placement: place_row)\n" " {\n" " image(image: 'stop.png'); \n" "\n" " column(vertical: align_fill)\n" " {\n" " static_text(name: 'Unfortunately, something drastic has happened. If you would like we can try to continue with the operation, but there is a chance you will blow up your computer. Would you like to try?', characters: 25);\n" " row(vertical: align_bottom, horizontal: align_right)\n" " {\n" " button(name: 'Cancel', action: @cancel, cancel: true);\n" " button(name: 'OK', bind: @result, action: @ok, default: true);\n" " }\n" " }\n" " }\n" "}"); std::istringstream adam( "sheet alert_dialog\n" "{\n" "output:\n" " result <== { dummy_value: 42 };\n" "}"); GG::ExecuteModalDialog(eve, adam, &OkHandler); Exit(0); }
int main(int argc, char** argv) { /**** people (unrelated) ****/ Person adam("Adam", male); Person eve("Eve", female); Person joan("Joan", female); Person george("George", male); Person joseph("Joseph", male); Person hillary("Hillary", female); /***** 2nd generation *****/ // Adam and Eve are parents of Abel, Martha, Mary, and Bill Person *pAbel = eve.addChild(new Person("Abel", male)); adam.addChild(pAbel); Person *pMartha = eve.addChild(new Person("Martha", female)); adam.addChild(pMartha); Person *pMary = eve.addChild(new Person("Mary", female)); adam.addChild(pMary); Person *pBill = eve.addChild(new Person("Bill", male)); adam.addChild(pBill); /***** 3nd generation *****/ // Joan Abel are parents of Missy Person *pMissy = joan.addChild("Missy", female); pAbel->addChild(pMissy); // George and Martha are parents of Jacky and Patsy Person *pJacky = george.addChild("Jacky", female); pMartha->addChild(pJacky); Person *pPatsy = george.addChild("Patsy", female); pMartha->addChild(pPatsy); // Mary and Joseph are parents of James Person *pJames = pMary->addChild("James", male); joseph.addChild(pJames); // Bill and Hillary are parents of Chelsea Person *pChelsea = pBill->addChild("Chelsea", female); hillary.addChild(pChelsea); /***** Cousins *****/ pMissy->addCousin(pJacky); pMissy->addCousin(pPatsy); pMissy->addCousin(pJames); pMissy->addCousin(pChelsea); pJacky->addCousin(pMissy); pJacky->addCousin(pJames); pJacky->addCousin(pChelsea); pPatsy->addCousin(pMissy); pPatsy->addCousin(pJames); pPatsy->addCousin(pChelsea); pJames->addCousin(pMissy); pJames->addCousin(pJacky); pJames->addCousin(pPatsy); pJames->addCousin(pChelsea); pChelsea->addCousin(pMissy); pChelsea->addCousin(pJacky); pChelsea->addCousin(pPatsy); pChelsea->addCousin(pJames); // output all the people in the tree /* std::cout << "\nAll the people in the tree:\n\n"; std::cout << adam << eve; std::cout << *pAbel << joan << george << *pMartha << *pMary << joseph << *pBill << hillary; std::cout << *pMissy << *pJacky << *pPatsy << *pJames << *pChelsea << "\n"; */ std::cout << "\n\t******** Cousins ********\n"; // std::cout << "\n\t**** Parents and Cousins ****\n"; // pMissy->showParents(pMissy); pMissy->getCousins(pMissy); // pJacky->showParents(pJacky); pJacky->getCousins(pJacky); // pPatsy->showParents(pPatsy); pPatsy->getCousins(pPatsy); // pJames->showParents(pJames); pJames->getCousins(pJames); // pChelsea->showParents(pChelsea); pChelsea->getCousins(pChelsea); std::cout << "\n\n"; return 0; }