//*************************************************************************************************************
void UninitScene()
{
	streamer.Destroy();
	WaitForSingleObject(worker.GetHandle(), 3000);

	worker.Close();

	if( masteringvoice )
		masteringvoice->DestroyVoice();

	if( xaudio2 )
		xaudio2->Release();

	// don't do this, ever!!!
	system1.~ParticleSystem();

	for( int i = 0; i < NUM_DWARFS; ++i )
		dwarfs[i].~AnimatedMesh();

	SAFE_RELEASE(skyeffect);
	SAFE_RELEASE(skymesh);
	SAFE_RELEASE(skytex);
	SAFE_RELEASE(text);
	SAFE_RELEASE(mesh);
	SAFE_RELEASE(effect);
	SAFE_RELEASE(texture1);
	SAFE_RELEASE(texture2);

	DXKillAnyRogueObject();
	//CoUninitialize();
}
//*************************************************************************************************************
void UninitScene()
{
	SAFE_RELEASE(exponential);
	SAFE_RELEASE(convolution);
	SAFE_RELEASE(variance);
	SAFE_RELEASE(expvariance);
	SAFE_RELEASE(boxblur5x5);
	SAFE_RELEASE(pcf5x5);
	SAFE_RELEASE(pcss);
	SAFE_RELEASE(pcfirreg);
	SAFE_RELEASE(vertexdecl);
	SAFE_RELEASE(skull);
	SAFE_RELEASE(box);
	SAFE_RELEASE(shadowmap);
	SAFE_RELEASE(noise);
	SAFE_RELEASE(sincoeffs);
	SAFE_RELEASE(coscoeffs);
	SAFE_RELEASE(blurARGB8);
	SAFE_RELEASE(blurRGBA32F);
	SAFE_RELEASE(text);
	SAFE_RELEASE(texture1);
	SAFE_RELEASE(texture2);
	SAFE_RELEASE(texture3);

	DXKillAnyRogueObject();
}
Exemple #3
0
//*************************************************************************************************************
void UninitScene()
{
	SAFE_RELEASE(skyeffect);
	SAFE_RELEASE(hdreffect);
	SAFE_RELEASE(fresnel);
	SAFE_RELEASE(skymesh);
	SAFE_RELEASE(mesh1);
	SAFE_RELEASE(mesh2);
	SAFE_RELEASE(mesh3);

	SAFE_RELEASE(text);
	SAFE_RELEASE(texture);
	SAFE_RELEASE(fresneltexture);
	SAFE_RELEASE(skytexture);
	SAFE_RELEASE(roughspecular);
	SAFE_RELEASE(vertexdecl);

	SAFE_RELEASE(scenesurface);
	SAFE_RELEASE(scenetarget);

	SAFE_RELEASE(ghostsurfaces[0]);
	SAFE_RELEASE(ghostsurfaces[1]);
	SAFE_RELEASE(ghosttargets[0]);
	SAFE_RELEASE(ghosttargets[1]);

	SAFE_RELEASE(aftersurfaces[0]);
	SAFE_RELEASE(aftersurfaces[1]);
	SAFE_RELEASE(afterimages[0]);
	SAFE_RELEASE(afterimages[1]);

	for( int i = 0; i < 6; ++i )
	{
		SAFE_RELEASE(avglumsurfaces[i]);
		SAFE_RELEASE(avglumtargets[i]);
	}

	for( int i = 0; i < 5; ++i )
	{
		SAFE_RELEASE(dssurfaces[i]);
		SAFE_RELEASE(blursurfaces[i]);

		SAFE_RELEASE(dstargets[i]);
		SAFE_RELEASE(blurtargets[i]);
	}

	for( int i = 0; i < 4; ++i )
	{
		for( int j = 0; j < 2; ++j )
		{
			SAFE_RELEASE(starsurfaces[i][j]);
			SAFE_RELEASE(startargets[i][j]);
		}
	}

	DXKillAnyRogueObject();
}
Exemple #4
0
void UninitScene()
{
	delete palm;
	delete sandplane;
	delete waterplane;

	SAFE_RELEASE(refractsurf);
	SAFE_RELEASE(reflectsurf);
	SAFE_RELEASE(occludersurf);
	SAFE_RELEASE(blursurf);
	SAFE_RELEASE(sceneldrsurf);
	SAFE_RELEASE(bloomsurf1);
	SAFE_RELEASE(bloomsurf2);

	SAFE_RELEASE(refraction);
	SAFE_RELEASE(reflection);
	SAFE_RELEASE(occluders);
	SAFE_RELEASE(blurtex);
	SAFE_RELEASE(sceneldr);
	SAFE_RELEASE(bloomtex1);
	SAFE_RELEASE(bloomtex2);

	SAFE_RELEASE(skymesh);
	SAFE_RELEASE(quaddecl);

	SAFE_RELEASE(skyeffect);
	SAFE_RELEASE(ambient);
	SAFE_RELEASE(specular);
	SAFE_RELEASE(water);
	SAFE_RELEASE(bloom);
	SAFE_RELEASE(godray);

	SAFE_RELEASE(skytex);
	SAFE_RELEASE(bark);
	SAFE_RELEASE(leaves);
	SAFE_RELEASE(sand);
	SAFE_RELEASE(waves);

	DXKillAnyRogueObject();
}