示例#1
0
void GameSystem::Shutdown()
{
	if (m_Graphics)
	{
		m_Graphics->Shutdown();
		delete m_Graphics;
		m_Graphics = 0;
	}

	if (m_SysTimer)
	{
		delete m_SysTimer;
		m_SysTimer = 0;
	}

	if (m_Input)
	{
		delete m_Input;
		m_Input = 0;
	}

	if (m_PostMaster)
	{
		m_PostMaster->Shutdown();
		delete m_PostMaster;
		m_PostMaster = 0;
	}

	ShutdownWindows();

	return;
}
示例#2
0
void SystemClass::ShutDown()
{
	// 释放计时器对象
	if(m_Timer)
	{
		delete m_Timer;
		m_Timer = nullptr;
	}

	if(m_Graphics)
	{
		m_Graphics->ShutDown();
		delete m_Graphics;
		m_Graphics = nullptr;
	}

	if(m_Input)
	{
		delete m_Input;
		m_Input = nullptr;
	}

	// 执行窗口一些销毁工作
	ShutdownWindows();
}
示例#3
0
void SystemClass::Shutdown()
{
	// Release the sound object.
	if(m_Sound)
	{
		m_Sound->Shutdown();
		delete m_Sound;
		m_Sound = 0;
	}

	// Release the graphics object.
	if(m_Graphics)
	{
		m_Graphics->Shutdown();
		delete m_Graphics;
		m_Graphics = 0;
	}

	// Release the input object.
	if(m_Input)
	{	
		m_Input->Shutdown();
		delete m_Input;
		m_Input = 0;
	}

	// Shutdown the window.
	ShutdownWindows();

	return;
}
示例#4
0
//入口函数
int WINAPI WinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nShowCmd )
{
	Initialize();
	Run();
	ShutdownWindows();
	return 0;
}
示例#5
0
void
System::Shutdown()
{
	//Release the graphics object
	if (m_graphics)
	{
		m_graphics->Shutdown();
		delete m_graphics;
		m_graphics = 0;
	}

	//Release the OpenGL object
	if (m_openGL)
	{
		m_openGL->Shutdown(m_hWnd);
		delete m_openGL;
		m_openGL = 0;
	}

	//Release the input object
	if (m_input)
	{
		delete m_input;
		m_input = 0;
	}

	//Shutdown the window
	ShutdownWindows();

	return;
}
void SystemClass::Shutdown()
{
	// Release the timer object.
	if(m_Timer)
	{
		delete m_Timer;
		m_Timer = 0;
	}

	// Release the graphics object.
	if(m_Graphics)
	{
		m_Graphics->Shutdown();
		delete m_Graphics;
		m_Graphics = 0;
	}

	// Release the input object.
	if(m_Input)
	{
		m_Input->Shutdown();
		delete m_Input;
		m_Input = 0;
	}

	// Shutdown the window.
	ShutdownWindows();
	
	return;
}
System::~System()
{
	delete game;
	delete timer;
	delete cpuUsage;
	ShutdownWindows();
}
示例#8
0
文件: main.cpp 项目: Jesna/DirectX
//应用程序入口main函数 
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
{
	Initialize();
	Run();
	ShutdownWindows();
	return 0;
}
示例#9
0
/*
	The Shutdown function does the clean up.
	It shuts down and releases everything associated with the graphics and input object.
	As well it also shuts down the window and cleans up the handles associated with it.
*/
void SystemClass::Shutdown()
{
	// Release the graphics object.
	if (m_renderer)
	{
		m_renderer->ShutDown();
		delete m_renderer;
		m_renderer = nullptr;
	}

	if (m_currentScene)
	{
		m_currentScene->ShutDown();
		delete m_currentScene;
		m_currentScene = nullptr;
	}

	// Release the input object.
	if (m_input)
	{
		delete m_input;
		m_input = nullptr;
	}


	// Shutdown the window.
	ShutdownWindows();

	return;
}
示例#10
0
void SystemClass::Shutdown()
{
	if(m_Graphics)
	{
		m_Graphics->Shutdown();
		delete m_Graphics;
		m_Graphics = 0;
	}

	if(m_Input)
	{
		m_Input->ShutDown();
		delete m_Input;
		m_Input = 0;
	}

	if(m_Timer)
	{
		delete m_Timer;
		m_Timer = 0;
	}

	ShutdownWindows();

	return;
}
示例#11
0
void SystemClass::Shutdown()
{
	//其他类的一些销毁工作
	//···
	if (m_Graphics)
	{
		m_Graphics->Shutdown();
		delete m_Graphics;
		m_Graphics = 0;
	}

	if (m_Input)
	{
		delete m_Input;
		m_Input = 0;
	}

	if (m_timer)
	{
		delete m_timer;
		m_timer = 0;
	}

	//执行窗口的销毁
	ShutdownWindows();
}
示例#12
0
void System::Shutdown(){
	// release the application wrapper object
	if (m_Application){
		m_Application->Shutdown();
		delete m_Application;
		m_Application = 0;
	}

	// shutdown the windows
	ShutdownWindows();
}
示例#13
0
void System::Shutdown()
{
	// Release the d3dbase
	if (m_application)
	{
		m_application->Shutdown();
		delete m_application;
	}

	// Shutdown the window.
	ShutdownWindows();
}
示例#14
0
void System::Shutdown()
{
	//Graphics
	m_graphics->Shutdown();
	delete m_graphics;
	m_graphics = 0;

	//Input
	delete m_input;
	m_input = 0;

	ShutdownWindows();
}
示例#15
0
void SystemClass::Shutdown()
{
	//其它类的一些销毁工作
	if (m_Graphics)
	{
		m_Graphics->Shutdown();
		delete m_Graphics;
		m_Graphics = 0;
	}

	// 执行一些销毁工作.
	ShutdownWindows();
}
示例#16
0
	void Window::Shutdown()
	{
		if (input)
		{
			input->Shutdown();
			delete input;
			input = 0;
		}
		if (d3d)
		{
			d3d->Shutdown();
			delete d3d;
			d3d = 0;
		}
		if (sound)
		{
			sound->Shutdown();
			delete sound;
			sound = 0;
		}
		if (text)
		{
			text->Shutdown();
			delete text;
			text = 0;
		}
		if (camera)
		{
			delete camera;
			camera = 0;
		}
		if (timer)
		{
			delete timer;
			timer = 0;
		}
		if (fps)
		{
			delete fps;
			fps = 0;
		}
		if (cpu)
		{
			cpu->Shutdown();
			delete cpu;
			cpu = 0;
		}

		ShutdownWindows();
		return;
	}
示例#17
0
void CSystem::Shutdown()
{
	// Release the application wrapper object.
	if(m_Application)
	{
		m_Application->Shutdown();
		delete m_Application;
		m_Application = 0;
	}

	// Shutdown the window.
	ShutdownWindows();
	
	return;
}
示例#18
0
void SystemClass::Shutdown()
{
	// Release the application wrapper object.
	if (m_realTimeViewer)
	{
		m_realTimeViewer->Shutdown();
		delete m_realTimeViewer;
		m_realTimeViewer = 0;
	}

	// Shutdown the window.
	ShutdownWindows();

	return;
}
示例#19
0
void Application::Shutdown()
{
  // Shutdown all systems
  for( System* sys : m_systems ) 
  {
    sys->Shutdown();
    delete sys;
    sys = 0;
  }
  m_systems.clear();

  // Shutdown windows API stuff.
  ShutdownWindows();

  return;
}
示例#20
0
void SystemClass::Shutdown()
{
	if(m_Graphics)
	{
		m_Graphics->Shutdown();
		delete m_Graphics;
		m_Graphics = 0;
	}

	if(m_Input)
	{
		delete m_Input;
		m_Input = 0;
	}

	ShutdownWindows();
}
示例#21
0
void CSystem::ShutDown()
{
	if(m_pRenderer)
	{
		m_pRenderer->Shutdown();
		SAFEDELETE(m_pRenderer);
	}

	if(m_pInput)
	{
		SAFEDELETE(m_pInput);
	}

	ShutdownWindows();

	return;
}
示例#22
0
void Engine::Shutdown(){
	DGEngineShutDown();

	if(m_Graphics){
		delete m_Graphics;
		m_Graphics = 0;
	}

	if(m_Input){
		delete m_Input;
		m_Input = 0;
	}

	ShutdownWindows();

	return;
}
示例#23
0
文件: main.cpp 项目: kubikle/rev2014
void CleanupDevice()
{
	ShutdownWindows();
	if( g_pImmediateContext ) g_pImmediateContext->ClearState();

	if( g_pBackBuffer ) g_pBackBuffer->Release();
	if( g_pSwapChain ) g_pSwapChain->Release();
	if( g_pImmediateContext ) g_pImmediateContext->Release();
	if( g_pd3dDevice ) g_pd3dDevice->Release();

#ifdef _DEBUG 
	ID3D11Debug *debugDev;
	g_pd3dDevice->QueryInterface(__uuidof(ID3D11Debug), reinterpret_cast<void**>(&debugDev));
	debugDev->ReportLiveDeviceObjects(D3D11_RLDO_DETAIL);

#endif

}
示例#24
0
void CSystem::Shutdown()
{
    if (graphics)
    {
        graphics->Shutdown();
        delete graphics;
        graphics = 0;
    }
    if (input)
    {
        delete input;
        input = 0;
    }

    ShutdownWindows();

    return;
}
示例#25
0
void SystemClass::Shutdown()
{
	// release graphics object
	if (graphics)
	{
		graphics->Shutdown();
		delete graphics;
		graphics = NULL;
	}

	if (input)
	{
		delete input;
		input = NULL;
	}

	ShutdownWindows();
}
示例#26
0
//--- Shutdown(): Does all necessary cleanup/releasing for the graphcis and input objects. Also shuts down window and handles. ---//
void SystemClass::Shutdown()
{

    // Release the timer object
    if (m_Timer)
    {
        delete m_Timer;
        m_Timer = 0;
    }

    // Release the cpu object
    if (m_Cpu)
    {
        m_Cpu->Shutdown();
        delete m_Cpu;
        m_Cpu = 0;
    }

    // Release the fps object
    if (m_Fps)
    {
        delete m_Fps;
        m_Fps = 0;
    }

    //Release the graphics object
    if (m_Graphics)
    {
        m_Graphics->Shutdown();
        delete m_Graphics;
        m_Graphics = 0;
    }

    //Release the input object
    if (m_Input)
    {
        delete m_Input;
        m_Input = 0;
    }

    //Shutdown the window
    ShutdownWindows();

}
示例#27
0
/*
 *	Shutdown()
 *	brief: This function does the clean up of the SystemClass. It releases everything associated with the graphics and input objects.
 *		   It also releases and shuts down everything associated to the windows api.
 */
void SystemClass::Shutdown()
{
	//Cleanup of the graphics object.
	if (m_Graphics)
	{
		m_Graphics->Shutdown();
		delete m_Graphics;
		m_Graphics = nullptr;
	}

	//Cleanup of the input object.
	if (m_Input)
	{
		m_Input->Shutdown();
		delete m_Input;
		m_Input = nullptr;
	}

	//Shutdown windows.
	ShutdownWindows();
}
示例#28
0
bool DXManager::Init()
{
	bool result = false;

	result = InitWindow(m_WindowWidth, m_WindowHeight);
	if (!result)
	{
		ShutdownWindows();
		Log::LogError("DXManager::Window Init Error.");
		return false;
	}
	
	result = InitDX12(m_hWnd, m_WindowWidth, m_WindowHeight);
	if (!result)
	{
		ShutdownDX12();
		Log::LogError("DXManager::Window Init DX12.");
		return false;
	}
	return true;
}
bool SystemClass::Shutdown()
{
	// Release the graphics object.
	if ( m_Graphics )
	{
		m_Graphics->Shutdown();
		delete m_Graphics;
		m_Graphics = 0;
	}

	// Release the input object.
	if ( m_Input )
	{
		delete m_Input;
		m_Input = 0;
	}

	// Shutdown the window.
	ShutdownWindows();

	return true;
}
示例#30
0
void SystemClass::Shutdown()
{
	//release the graphics object
	if (m_Graphics)
	{
		m_Graphics->Shutdown();
		delete m_Graphics;
		m_Graphics = 0;
	}

	//release input object
	if (m_Input)
	{
		delete m_Input;
		m_Input = 0;
	}

	//shutdown the window
	ShutdownWindows();

	return;

}