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


C++ SystemClass::Shutdown方法代码示例

本文整理汇总了C++中SystemClass::Shutdown方法的典型用法代码示例。如果您正苦于以下问题:C++ SystemClass::Shutdown方法的具体用法?C++ SystemClass::Shutdown怎么用?C++ SystemClass::Shutdown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SystemClass的用法示例。


在下文中一共展示了SystemClass::Shutdown方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main()
{
	//WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)

	SystemClass* system = nullptr; // could make a static ISystemClass* variable and make ISystemClass

#ifdef _WIN32
	system = &SystemClass::GetInstance();
#endif

	if (!system)
	{
		return 0;
	}

	// Initialise and run the system object
	bool result = system->Initialise();
	if (result)
	{
		system->Run();
	}

	// Shutdown and releasr the system object.
	system->Shutdown();

	return 0;



}
开发者ID:OllieBM,项目名称:Engine,代码行数:30,代码来源:main.cpp

示例2: WinMain

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
{
	SystemClass* System;

	// 创建System类
	System = new SystemClass;

	if (!System)
	{
		return 0;
	}

	// 初始化System类,主循环
	if (System->Initialze())
	{
		System->Run();
	}

	// 删除System类
	System->Shutdown();
	delete System;
	System = NULL;

	return 0;

}
开发者ID:liu1700,项目名称:Fire-Engine,代码行数:26,代码来源:FireMain.cpp

示例3: WinMain

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
	SystemClass* System;
	bool result;
	
	
	// Create the system object.
	System = new SystemClass;
	if(!System)
	{
		return 0;
	}

	// Initialize and run the system object.
	result = System->Initialize();
	if(result)
	{
		System->Run();
	}

	// Shutdown and release the system object.
	System->Shutdown();
	delete System;
	System = 0;

	return 0;
}
开发者ID:xtr3m3nerd,项目名称:DirectXKinectFramework,代码行数:27,代码来源:main.cpp

示例4: WinMain

//应用程序入口main函数
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
	SystemClass* System;
	bool result;

	// 创建一个system对象.
	System = new SystemClass;
	if (!System)
	{
		return 0;
	}

	// 初始化以及运行system对象.
	result = System->Initialize();
	if (result)
	{
		System->Run();
	}

	// 关闭以及释放system对象.
	System->Shutdown();
	delete System;
	System = 0;
	return 0;
}
开发者ID:liqunzheng,项目名称:Dx11Study,代码行数:26,代码来源:main.cpp

示例5: WinMain

int CALLBACK WinMain( HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR     /*lpCmdLine*/, int       /*nCmdShow*/)
{
    SystemClass* system = nullptr;
    bool result = true;

    //Create the system object
    system = new SystemClass();
    if (!system) 
    {
        return 0;
    }

    //Initialize and run the system object
    result = system->Initialize();
    if (result)
    {
        system->Run();
    }

    //Shutdown and release the system object.
    system->Shutdown();
    delete system;
    system = 0;

    return 0;
}
开发者ID:gormanme,项目名称:DirectX,代码行数:26,代码来源:main.cpp

示例6: WinMain

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
	SystemClass* System;
	bool result;

	AllocConsole();
	freopen("conin$","r",stdin);
	freopen("conout$","w",stdout);
	freopen("conout$","w",stderr);
	printf("Debugging Window:\n");
	
	// Create the system object.
	System = new SystemClass;
	if(!System)
	{
		return 0;
	}

	// Initialize and run the system object.
	result = System->Initialize();
	if(result)
	{
		System->Run();
	}

	// Shutdown and release the system object.
	System->Shutdown();
	delete System;
	System = 0;

	return 0;
}
开发者ID:jcoughlan,项目名称:jc_ngn,代码行数:32,代码来源:main.cpp

示例7: WinMain

int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,PSTR pScmdLine,int iCmdShow)
{
	
	SystemClass* system = nullptr;

	bool result;

	system = new SystemClass;

	if (!system)
		result = false;

	result = system->Initialize();

	if (result)
	{
		system->Run();
	}

	system->Shutdown();

	delete system;

	system = nullptr;

}
开发者ID:find-happiness,项目名称:MineEngine,代码行数:26,代码来源:main.cpp

示例8: WinMain

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
	surfCameraInstance.Init("Photo5.jpg");

	while (true) {
		surfCameraInstance.Frame();
	}

	SystemClass* System;
	bool result;
	//int counter = 0;
	
	// Create the system object.
	System = new SystemClass;
	if(!System)
	{
		return 0;
	}

	// Initialize and run the system object.
	result = System->Initialize();
	if(result)
	{
		System->Run();
	}

	// Shutdown and release the system object.
	System->Shutdown();
	delete System;
	System = 0;

	return 0;
}
开发者ID:Arryn99,项目名称:AugRealityOpenGL3OpenCV,代码行数:33,代码来源:main.cpp

示例9: WinMain

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
    //FILELog::ReportingLevel() = logDEBUG3;
    //FILE* log_fd = fopen( "mylogfile.txt", "w" );
    //Output2FILE::Stream() = log_fd;
    SystemClass* System; //pointer to a System object
    bool result;

    System = new SystemClass; //create new System object where the pointer is pointing

    if(!System) //if system is null
    {
        return 0;
    }

    result = System->Initialize(); //run the initialize method in the object that System is pointing at
    if(result) //if it returned true
    {
        System->Run(); //start the program loop by running Run in the object that system is pointing at
    }

    System->Shutdown(); //clean System object
    delete System; //remove system object
    System = 0; //set pointer to null

    return 0; //exit da program
}
开发者ID:NukePie,项目名称:Engine,代码行数:27,代码来源:main.cpp

示例10: _tWinMain

int APIENTRY _tWinMain( _In_ HINSTANCE hInstance,
                        _In_opt_ HINSTANCE hPrevInstance,
                        _In_ LPTSTR    lpCmdLine,
                        _In_ int       nCmdShow )
{
    // Create the system object.
    SystemClass* pSystem = new SystemClass;
    if ( !pSystem )
    {
        return 0;
    }

    // Initialize and run the system object.
    bool bResult = pSystem->Initialize();
    if ( bResult )
    {
        pSystem->Run();
    }

    // Shutdown and release the system object.
    pSystem->Shutdown();
    delete pSystem;
    pSystem = 0;

    return 0;
}
开发者ID:chchwy,项目名称:RasterTek-Dx11-Tutorials,代码行数:26,代码来源:main.cpp

示例11: WinMain

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pScmdline, int iCmdshow ) {
	SystemClass* system;
	bool result;
	system = new SystemClass;
	if ( !system ) return 0;
	result = system->Initialize( );
	if ( result ) system->Run();
	system->Shutdown( );
	delete system;
	system = 0;
	return 0;
}
开发者ID:PINK-FL0YD,项目名称:DirectX-11-Tutorial,代码行数:12,代码来源:Main.cpp

示例12: WinMain

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
	/*
     HINSTANCE hInstance  : handle of the applications current instance
	 HINSTANCE hPrevInstance : handle of the applications previous instance (should be NULL according to MSDN)
	 PSTR pScmdline : commandline arguments invoked with main (we won't use this)
	 int iCmdshow : An ID that specifies how the window should be shown

	 There is also a wWinMain(...) version with the same arguments that passes unicode characters for
	 the pScmdline argument rather than ANSI as WinMain does
	*/

	SystemClass* System; //system class encapsulates our overall app
	bool result;

	/*
	Allocate a "side car" console so we can write some debug information out to it
	*/
	if(use_debug_console) AllocConsole();
	writeToDebugConsole(L"Hello World\n");

	// Create the system object.
	System = new SystemClass;
	if(!System)
	{
		return 0; //our system object did not construct properly
	}


	// Initialize our system object and run the application by asking
	// the system object to run.
	result = System->Initialize();
	if(result)
	{
		System->Run();
	}

	// Shutdown and release the system object.
	System->Shutdown(); //give system a chance to clean up
	delete System;  //release the system object's memory
	System = 0;     //set system pointer to 0 so it is no longer valid

	return 0;
}
开发者ID:Elephly,项目名称:SnatchGame,代码行数:44,代码来源:main.cpp

示例13: WinMain

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdShow) {
	SystemClass* systemClass;

	bool result;

	systemClass = new SystemClass;
	if (!systemClass) {
		return 0;
	}

	result = systemClass->Initialize();
	if (result) {
		systemClass->Run();
	}

	systemClass->Shutdown();
	delete systemClass;
	systemClass = 0;

	return 0;
}
开发者ID:Jaymz,项目名称:DX10,代码行数:21,代码来源:main.cpp

示例14: WinMain

int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, PSTR pCmdLine, int iCmdShow)
{
	SystemClass* system;
	bool result;

	system = new SystemClass;
	if (!system)
	{
		return -1;
	}

	result = system->Initialize();
	if (result)
	{
		system->Run();
	}

	system->Shutdown();
	delete system;
	system = NULL;
	return 0;
}
开发者ID:grimripper,项目名称:grim_directx_testing,代码行数:22,代码来源:main.cpp

示例15: WinMain

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
	SystemClass* System;
	bool result;

	System = new SystemClass;

	if(!System)
	{
		return 1;
	}

	if(System->Initialize())
	{
		System->Run();
	}

	System->Shutdown();
	delete System;
	System = 0;

	return 0;
}
开发者ID:jel-massih,项目名称:TerrainEngine,代码行数:23,代码来源:main.cpp


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