public D3D9DepthBuffer( PoolId poolId, D3DRenderSystem renderSystem, Device creator, Surface depthBufferSurf, Format fmt, int width, int height, MultisampleType fsaa, int multiSampleQuality, bool isManual) : base(poolId, 0, width, height, (int)fsaa, "", isManual) { depthBuffer = depthBufferSurf; this.creator = creator; this.multiSampleQuality = multiSampleQuality; d3dFormat = fmt; this.renderSystem = renderSystem; switch (fmt) { case Format.D16Lockable: case Format.D15S1: case Format.D16: bitDepth = 16; break; case Format.D32: case Format.D24S8: case Format.D24X8: case Format.D24X4S4: case Format.D32Lockable: case Format.D24SingleS8: bitDepth = 32; break; } }
protected override void dispose(bool disposeManagedResources) { // this causes infinite recursions in axiom //Shutdown(); // Deleting the HLSL program factory if ( _hlslProgramFactory != null ) { // Remove from manager safely if ( HighLevelGpuProgramManager.Instance != null ) HighLevelGpuProgramManager.Instance.RemoveFactory( _hlslProgramFactory ); _hlslProgramFactory.Dispose(); _hlslProgramFactory = null; } if ( _pD3D != null ) { _pD3D.Dispose(); _pD3D = null; } if ( _resourceManager != null ) { _resourceManager.Dispose(); _resourceManager = null; } LogManager.Instance.Write( "D3D9 : {0} destroyed.", Name ); _D3D9RenderSystem = null; base.dispose( disposeManagedResources ); }