int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow) { D3DApp *app = D3DApp::GetApp(); if (app->Initialize(hInstance, width, height)) { app->Run(); } app->Destroy(); }