int SDL_main(int argc, char *argv[]) { int ret = 0; ret = UpgradeInit(); if (ret) goto end; if (SDL_Init(SDL_INIT_VIDEO) < 0) printf("Couldn't initialize SDL: %s\n", SDL_GetError()); logic_init(); WebServerInit(); SceneInit(); SceneLoad(); AudioInit(); ret = SceneRun(); dprintf(" SceneRun exit !!!\n"); FeetDog_Exit(); SceneExit(); if (ret != QUIT_UPGRADE_WEB) WebServerExit(); NetworkExit(); uninit_auTimer(); SDL_Quit(); end: ret = UpgradeProcess(ret); itp_codec_standby(); exit(ret); return ret; }
void Init() { glClearColor(1.0,1.0,1.0,0.0); glColor3f(0.0,0.0,0.0); GetPointList(); SceneInit(); }
SceneManager::SceneManager(const std::string& receivedPath) { scenePath = receivedPath; _root = new osg::Group; SceneInit(); //SceneShow(); }
int Game_Init(void *parms = NULL, int num_parms = 0) { // this is called once after the initial window is created and // before the main event loop is entered, do all your initialization // here ghDC = GetDC(ghWnd); EnableOpenGL(); SceneInit(WIDTH, HEIGHT); // return success or failure or your own return code here return(1); } // end Game_Init
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MSG msg; HACCEL hAccelTable; vec.push_back(new Points); vec.push_back(new Lines); // vec.push_back(new Lines); MyRegisterClass(hInstance); if (!InitInstance (hInstance, nCmdShow)) { return FALSE; } GetClientRect(g_hwnd,&g_clientRect); g_cliWidth = g_clientRect.right - g_clientRect.left; g_cliHeight = g_clientRect.bottom - g_clientRect.top; EnableOpenGL(); SceneInit(g_clientRect.right, g_clientRect.bottom); GetWindowRect(g_hwnd, &g_rect); g_scrWidth = g_rect.right - g_rect.left; g_scrHeight = g_rect.bottom - g_rect.top; if(g_cliWidth > 0 && g_cliHeight > 0) SceneResizeViewport(g_cliWidth, g_cliHeight); hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_XY); SceneShow(); while (GetMessage(&msg, NULL, 0, 0)) { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } DisableOpenGL(); DestroyWindow(g_hwnd); for(size_t i = 0; i != vec.size(); ++i) delete vec[i]; vec.clear(); ChangeDisplaySettings(NULL,0); return msg.wParam; }