本文整理汇总了C++中MyApp::PreInit_CreateViewports方法的典型用法代码示例。如果您正苦于以下问题:C++ MyApp::PreInit_CreateViewports方法的具体用法?C++ MyApp::PreInit_CreateViewports怎么用?C++ MyApp::PreInit_CreateViewports使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyApp
的用法示例。
在下文中一共展示了MyApp::PreInit_CreateViewports方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// TODO: Place code here.
MSG msg;
ZERO_OUT(msg);
HACCEL hAccelTable;
// Initialize global strings
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadString(hInstance, IDC_SCENEVIEWER, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hInstance);
// Perform application initialization:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}
hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_SCENEVIEWER));
SetupBaseUtil setupBase;
FileLogUtil fileLog;
SetupCoreUtil setupCore;
SetupEngineUtil setupEngine;
CConsole console(APP_TITLE);
console.setTopLeft(0,0);
MyApp app;
#if 0
vector2d<int> resolution(800,600);
vector2d<int> topLeftCorner(800,450);
#else
//vector2d<int> resolution(1024,768);
vector2d<int> resolution(1400,900);
vector2d<int> topLeftCorner(0,0);
#endif
GetMessage(&msg, NULL, 0, 0);
{
MyAppWindow appWindow( &app, msg.hwnd );
appWindow.bringToFront();
appWindow.setTopLeft( topLeftCorner.x, topLeftCorner.y );
g_pMainWindow = &appWindow;
app.PreInit_CreateViewports( &appWindow );
GameTimer timer;
UNDONE;
if( !app.Initialize(MXC("???")) ) {
return -1;
}
// Main message loop:
while( true )
{
BOOL bPendingMsg = FALSE;
//if( appWindow.isActive() )
{
bPendingMsg = ::PeekMessage( &msg, NULL, 0, 0, PM_REMOVE );
}
//else
//{
// bPendingMsg = ::GetMessage( &msg, NULL, 0, 0 );
//}
if( msg.message == WM_QUIT )
{
//.........这里部分代码省略.........