コード例 #1
0
ファイル: renderer.cpp プロジェクト: pshort/flappy
Renderer::~Renderer(void)
{
	UnloadTextures();
	// if renderer is null and window then just leave
	if(renderer == nullptr && window == nullptr) 
		return;
	SDL_DestroyRenderer(renderer);
	SDL_DestroyWindow(window);
	IMG_Quit();
	SDL_Quit();
}
コード例 #2
0
void FGearVRSplash::Shutdown()
{
	SplashIsShown = false;
	UnloadTextures();
	LayerMgr->RemoveAllLayers();

	FCustomPresent* pCustomPresent = pPlugin->GetCustomPresent_Internal();
	if (pCustomPresent)
	{
		pCustomPresent->UnlockSubmitFrame();
	}
	ShowingBlack = false;
	LayerMgr->Shutdown();

	FAsyncLoadingSplash::Shutdown();
}
コード例 #3
0
ファイル: gr.cpp プロジェクト: paud/d2x-xl
void ResetTextures (int bReload, int bGame)
{
if (gameStates.app.bInitialized && ogl.m_states.bInitialized) {
	textureManager.Destroy (); 
	if (lightmapManager.HaveLightmaps ())
		lightmapManager.Release ();
	DestroyGlareDepthTexture ();
	if (bReload)
		fontManager.Remap ();
	if (bGame) {
		hudIcons.Destroy ();
		//ResetHoardData ();
		particleImageManager.FreeAll ();
		FreeExtraImages ();
		LoadAddonImages ();
		FreeStringPool ();
		OOF_ReleaseTextures ();
		ASE_ReleaseTextures ();
		if (bReload) {
			for (;;) {
				try {
					OglCacheLevelTextures ();
				}
				catch (int e) {
					if (e == EX_OUT_OF_MEMORY) {
						if (!gameOpts->render.textures.nQuality) {
							throw (e);
							}
						textureManager.Destroy ();
						UnloadTextures ();
						--gameOpts->render.textures.nQuality;
						continue;
						}
					else {
						throw (e);
						}
					}
				break;
				}
			OOF_ReloadTextures ();
			ASE_ReloadTextures ();
			}
		}
	}
}
コード例 #4
0
ファイル: Main_Win32.cpp プロジェクト: MrBowler/SD6-A3
//-----------------------------------------------------------------------------------------------
int WINAPI WinMain( HINSTANCE applicationInstanceHandle, HINSTANCE, LPSTR commandLineString, int )
{
	ParseCommandLineArgument( commandLineString );

	if( !g_isQuitting )
		Initialize( applicationInstanceHandle );

	while( !g_isQuitting )
	{
		RunFrame();
	}

	UnloadTextures();
	g_game.Destruct();

#if defined( _WIN32 ) && defined( _DEBUG )
	assert( _CrtCheckMemory() );
	_CrtDumpMemoryLeaks();
#endif

	return 0;
}
コード例 #5
0
ファイル: Renderer.cpp プロジェクト: hjcminus/BSPDemo
void dxRenderer::Shutdown()
{
    if (!inited)
    {
        return;
    }

    inited = false;

    SetColorMappings(1.0f);

    UnloadTextures();

    GL_UnloadTempTexture(texture_text);
    texture_text = 0;

    GL_DestroyProg(program_alpha);
    GL_DestroyProg(program_opaque);

    GL_DestroyVertexBuffer(vertbuf_sky);
    GL_DestroyVertexBuffer(texcoordbuf_sky);
    GL_DestroyProg(program_sky);
}
コード例 #6
0
ファイル: STGResources.cpp プロジェクト: SZSilence06/THXYY
STGResources::~STGResources()
{
	UnloadTextures();
	UnloadSounds();
}