本文整理汇总了C++中ModelLoader::release方法的典型用法代码示例。如果您正苦于以下问题:C++ ModelLoader::release方法的具体用法?C++ ModelLoader::release怎么用?C++ ModelLoader::release使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ModelLoader
的用法示例。
在下文中一共展示了ModelLoader::release方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WinMain
//.........这里部分代码省略.........
// CoInitialize(NULL);
// if (pDllRegisterServer != NULL)
// {
// pDllRegisterServer();
// }
//}
memset(&startupInfo, 0, sizeof(startupInfo));
startupInfo.cb = sizeof(startupInfo);
GetStartupInfo(&startupInfo);
if (startupInfo.lpTitle != NULL &&
stringHasCaseInsensitivePrefix(startupInfo.lpTitle, "command line ")
&& strcasestr(startupInfo.lpTitle, "ldview") != NULL)
{
runningWithConsole();
fromConsole = true;
}
#ifdef _DEBUG
int _debugFlag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
_debugFlag |= _CRTDBG_LEAK_CHECK_DF;
_CrtSetDbgFlag(_debugFlag);
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG);
if (!fromConsole)
{
createConsole();
}
// MessageBox(NULL, "Attach a debugger now...", "Debug", MB_OK);
#endif // _DEBUG
bool udok = setupUserDefaults(lpCmdLine, screenSaver,
isRemovableDrive(hInstance));
setupLocalStrings();
if (TCUserDefaults::boolForKey(DEBUG_COMMAND_LINE_KEY, false, false))
{
std::string message = "Command Line:\n";
message += lpCmdLine;
MessageBox(NULL, message.c_str(), "LDView", MB_OK);
}
if (!udok && !TCUserDefaults::longForKey("IniFailureShown", 0, 0))
{
UCCHAR message[2048];
UCSTR iniPath = mbstoucstring(TCUserDefaults::getIniPath());
sucprintf(message, COUNT_OF(message),
TCLocalStrings::get(_UC("IniFailure")), iniPath);
CUIWindow::messageBoxUC(NULL, message, _UC("LDView"), MB_OK);
delete iniPath;
TCUserDefaults::setLongForKey(1, "IniFailureShown", false);
}
if (screenSaver)
{
if (strncasecmp(lpCmdLine, "/p", 2) == 0 ||
strncasecmp(lpCmdLine, "-p", 2) == 0 ||
strncasecmp(lpCmdLine, "p", 1) == 0)
{
// preview mode
return doPreview(hInstance, lpCmdLine);
}
if (strncasecmp(lpCmdLine, "/c", 2) == 0 ||
strncasecmp(lpCmdLine, "-c", 2) == 0 ||
strncasecmp(lpCmdLine, "c", 1) == 0 ||
strlen(lpCmdLine) == 0)
{
SSConfigure *configure;
configure = new SSConfigure(hInstance);
#ifdef _DEBUG
_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG);
createConsole();
#endif // _DEBUG
configure->run();
// configure mode
return 1;
}
// This shouldn't be necessary, but I've received a report of a whole
// bunch of copies of the LDView screensaver running at once. This
// might not fix things entirely, but it will at least prevent it
// from launching multiple times concurrently.
CreateMutex(NULL, FALSE, "LDView Screensaver");
if (GetLastError() == ERROR_ALREADY_EXISTS)
{
return 0;
}
}
#ifdef _LOG_PERFORMANCE
LARGE_INTEGER frequency;
if (QueryPerformanceFrequency(&frequency))
{
debugPrintf("Frequency: %I64d\n", frequency.QuadPart);
}
#endif // _LOG_PERFORMANCE
OleInitialize(NULL);
//Win7JumpListStuff();
modelLoader = new ModelLoader(CUIWindow::getLanguageModule(), nCmdShow,
screenSaver);
retValue = mainLoop();
modelLoader->release();
return retValue;
} // WinMain