当前位置: 首页>>代码示例>>C++>>正文


C++ MyApp::PreInit_CreateViewports方法代码示例

本文整理汇总了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 )
			{
//.........这里部分代码省略.........
开发者ID:S-V,项目名称:Lollipop,代码行数:101,代码来源:SceneViewer.cpp


注:本文中的MyApp::PreInit_CreateViewports方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。