// Added to support dynamic rebuilding of the font texture // for adding fonts after initialization time public void RebuildFontTexture() { _fontSampler?.Dispose(); _fontResourceView?.Dispose(); CreateFontsTexture(); }
public override void DisplayMipMap(int level) { var samplerDescrition = new SamplerStateDescription(TextureFilter.ComparisonPoint, TextureAddressMode.Clamp) { MinMipLevel = level, MaxMipLevel = level }; specificMipmapSamplerState.Dispose(); specificMipmapSamplerState = SamplerState.New(Game.GraphicsDevice, samplerDescrition); }
public void Dispose() { if (disposed) { return; } texsampler.Dispose(); texsampleranis.Dispose(); texsamplerflow.Dispose(); foreach (InputLayout layout in layouts.Values) { layout.Dispose(); } layouts.Clear(); VSSceneVars.Dispose(); VSEntityVars.Dispose(); VSGeomVars.Dispose(); PSSceneVars.Dispose(); PSGeomVars.Dispose(); ps.Dispose(); psdef.Dispose(); vspt.Dispose(); vspct.Dispose(); vspnct.Dispose(); vspnctx.Dispose(); disposed = true; }
public void Dispose() { if (disposed) { return; } disposed = true; texsampler.Dispose(); sundisc.Dispose(); moonquad.Dispose(); skylayout.Dispose(); sunlayout.Dispose(); moonlayout.Dispose(); VSSunMoonVars.Dispose(); PSSunMoonVars.Dispose(); SkyLocalVars.Dispose(); VSSceneVars.Dispose(); VSEntityVars.Dispose(); VSModelVars.Dispose(); PSSceneVars.Dispose(); skyps.Dispose(); skyvs.Dispose(); sunps.Dispose(); sunvs.Dispose(); moonps.Dispose(); moonvs.Dispose(); }
public void Dispose() { if (constantLightBuffer != null) { constantLightBuffer.Dispose(); } if (constantCameraBuffer != null) { constantCameraBuffer.Dispose(); } if (textureResource != null) { textureResource.Dispose(); } if (constantMatrixBuffer != null) { constantMatrixBuffer.Dispose(); } sampleState.Dispose(); inputLayout.Dispose(); pixelShader.Dispose(); vertexShader.Dispose(); }
public void Dispose() { _constants.Dispose(); if (m_ds != null) { m_ds.Dispose(); m_ds = null; } if (m_rs != null) { m_rs.Dispose(); m_rs = null; } if (m_ss != null) { m_ss.Dispose(); m_ss = null; } if (m_srv != null) { m_srv.Dispose(); m_srv = null; } if (Shader != null) { Shader.Dispose(); Shader = null; } }
public void Unload() { PixelShader.Dispose(); VertexShader.Dispose(); TextureView.Dispose(); Sampler.Dispose(); BlendState.Dispose(); Texture2D.Dispose(); VertexBufferBinding.Buffer.Dispose(); VertexBuffer.Dispose(); Layout.Dispose(); ConstantBuffer.Dispose(); this.PixelShader = null; this.VertexShader = null; this.TextureView = null; this.Sampler = null; this.BlendState = null; this.Texture2D = null; this.VertexBufferBinding.Buffer = null; this.VertexBuffer = null; this.Layout = null; this.ConstantBuffer = null; }
public void Dispose() { if (disposed) { return; } if (texsampler != null) { texsampler.Dispose(); texsampler = null; } foreach (InputLayout layout in layouts.Values) { layout.Dispose(); } layouts.Clear(); VSSceneVars.Dispose(); VSEntityVars.Dispose(); VSModelVars.Dispose(); VSGeomVars.Dispose(); PSSceneVars.Dispose(); PSGeomVars.Dispose(); ps.Dispose(); psdef.Dispose(); vs.Dispose(); disposed = true; }
private void DisposeSamplerStates() { linearClampSamplerState.Dispose(); linearWrapSamplerState.Dispose(); pointClampSamplerState.Dispose(); pointWrapSamplerState.Dispose(); }
public void Dispose() { if (disposed) { return; } if (texsampler != null) { texsampler.Dispose(); texsampler = null; } foreach (InputLayout layout in layouts.Values) { layout.Dispose(); } layouts.Clear(); VSSceneVars.Dispose(); VSEntityVars.Dispose(); VSModelVars.Dispose(); GeomVars.Dispose(); BoneMatrices.Dispose(); shadowps.Dispose(); shadowvs.Dispose(); shadowvs_skin.Dispose(); disposed = true; }
public void Dispose() { if (disposed) { return; } cube.Dispose(); sphere.Dispose(); capsule.Dispose(); cylinder.Dispose(); texsampler.Dispose(); texsampleranis.Dispose(); texsamplertnt.Dispose(); foreach (InputLayout layout in layouts.Values) { layout.Dispose(); } layouts.Clear(); VSSceneVars.Dispose(); VSEntityVars.Dispose(); VSModelVars.Dispose(); VSGeomVars.Dispose(); PSSceneVars.Dispose(); PSGeomVars.Dispose(); InstGlobalVars.Dispose(); InstLocalVars.Dispose(); BoneMatrices.Dispose(); basicps.Dispose(); basicvspnct.Dispose(); basicvspnctt.Dispose(); basicvspncttt.Dispose(); basicvspncct.Dispose(); basicvspncctt.Dispose(); basicvspnccttt.Dispose(); basicvspnctx.Dispose(); basicvspncctx.Dispose(); basicvspncttx.Dispose(); basicvspnccttx.Dispose(); basicvspnctttx.Dispose(); basicvspncctttx.Dispose(); basicvspbbnct.Dispose(); basicvspbbnctx.Dispose(); basicvspbbnctt.Dispose(); basicvspbbncttt.Dispose(); basicvspbbncct.Dispose(); basicvspbbncctx.Dispose(); basicvspbbncttx.Dispose(); basicvsbox.Dispose(); basicvssphere.Dispose(); basicvscapsule.Dispose(); basicvscylinder.Dispose(); disposed = true; }
void ShutdownShader() { samplerState.Dispose(); matrixBuffer.Dispose(); inputLayout.Dispose(); pixelShader.Dispose(); vertexShader.Dispose(); }
public void Dispose() { vertexShader.Dispose(); pixelShader.Dispose(); sampler.Dispose(); resView.Dispose(); cbWorldMatrix.Dispose(); }
void ShutdownShader() { pixelBuffer.Dispose(); samplerState.Dispose(); constantBuffer.Dispose(); inputLayout.Dispose(); pixelShader.Dispose(); vertexShader.Dispose(); }
public void Dispose() { baseShader.Dispose(); sampler.Dispose(); inputLayout.Dispose(); baseShader = null; sampler = null; inputLayout = null; }
private void Dispose(bool disposing) { if (mState != null) { mState.Dispose(); mState = null; } mContext = null; }
protected virtual void Dispose(bool disposing) { if (disposing) { if (samplerState != null) { samplerState.Dispose(); } } }
public void Dispose() { LightBuffer.Dispose(); MatrixBuffer.Dispose(); VertexBuffer.Dispose(); MaterialBuffer.Dispose(); VertShader.Dispose(); PixShader.Dispose(); Layout.Dispose(); Sampler.Dispose(); }
public override void Dispose() { vertexShader?.Dispose(); pixelShader?.Dispose(); inputSignature?.Dispose(); layout?.Dispose(); ConstantsBuffer?.Dispose(); Texture?.Dispose(); Sampler?.Dispose(); base.Dispose(); }
public static void 全インスタンスで共有するリソースを解放する() { using var _ = new LogBlock(Log.現在のメソッド名); _ConstantBuffer.Dispose(); _SamplerState.Dispose(); _RasterizerState.Dispose(); _BlendState加算合成.Dispose(); _BlendState通常合成.Dispose(); _PixelShader.Dispose(); _VertexShader.Dispose(); }
private void ShuddownShader() { SamplerState?.Dispose(); SamplerState = null; ConstantMatrixBuffer?.Dispose(); ConstantMatrixBuffer = null; Layout?.Dispose(); Layout = null; PixelShader?.Dispose(); PixelShader = null; VertexShader?.Dispose(); VertexShader = null; }
protected override void OnDispose(bool d) { if (d) { DisposeResources(); _pointSampler.Dispose(); _linearSampler.Dispose(); Service.Remove <HdrTechnique>(); GraphicDeviceFactory.Device.BackBuffer.Resized -= OMBackBuffer_Resized; } base.OnDispose(d); }
public void Dispose() { if (!disposed) { disposed = true; vertexShader.Dispose(); pixelShader.Dispose(); instances.Dispose(); indices.Dispose(); sampler.Dispose(); vertexConstants.Dispose(); } }
/// <summary> /// Dispose element /// </summary> public void Dispose() { _rasterState.Dispose(); _blendState.Dispose(); _depthState.Dispose(); _samplerState.Dispose(); _backbufferView.Dispose(); _zbufferView.Dispose(); _swapchain.Dispose(); _deviceContext.Dispose(); _device.Dispose(); }
public void VertexSamplerStatesGetSet() { var samplerState = new SamplerState { Filter = TextureFilter.Point }; gd.VertexSamplerStates[0] = samplerState; var retrievedSamplerState = gd.VertexSamplerStates[0]; Assert.That(retrievedSamplerState, Is.SameAs(samplerState)); samplerState.Dispose(); }
public void Dispose() { Canvas.Dispose(); rasterizerState.Dispose(); blendState.Dispose(); depthStencilState.Dispose(); samplerState.Dispose(); backBufferView.Dispose(); depthStencilView.Dispose(); swapChain.Dispose(); NativeDeviceContext.Dispose(); NativeDevice.Dispose(); }
public void Dispose() { if (BatchDisposing != null) { BatchDisposing(this, new EventArgs()); } if (TextureD3D10 != null && !TextureD3D10.Disposed) { TextureD3D10.Dispose(); } if (TextureD3D11 != null && !TextureD3D11.Disposed) { TextureD3D11.Dispose(); } if (MutexD3D10 != null && !MutexD3D10.Disposed) { MutexD3D10.Dispose(); } if (MutexD3D11 != null && !MutexD3D11.Disposed) { MutexD3D11.Dispose(); } if (DWRenderTarget != null && !DWRenderTarget.Disposed) { DWRenderTarget.Dispose(); } if (VertexBuffer != null && !VertexBuffer.Disposed) { VertexBuffer.Dispose(); } if (VertexInputLayout != null && !VertexInputLayout.Disposed) { VertexInputLayout.Dispose(); } if (SpriteEffect != null && !SpriteEffect.Disposed) { SpriteEffect.Dispose(); } if (sampler != null && !sampler.Disposed) { sampler.Dispose(); } //以下の二つはRenderContextがDisposeされるときに呼ばれないとバグが出る。(画面真っ黒) //これは同じ種類のブレンドステートがDisposeされてしまうからだと予測できる。 //このため、Dispose予定リストに含めておき、RenderContextの破棄時に処理をする context.Disposables.Add(TransParentBlendState); context.Disposables.Add(state); }
public void Dispose() { if (disposed) { return; } if (texsampler != null) { texsampler.Dispose(); texsampler = null; } if (texsampleranis != null) { texsampleranis.Dispose(); texsampleranis = null; } if (texsamplertnt != null) { texsamplertnt.Dispose(); texsamplertnt = null; } foreach (InputLayout layout in layouts.Values) { layout.Dispose(); } layouts.Clear(); VSSceneVars.Dispose(); VSEntityVars.Dispose(); VSModelVars.Dispose(); VSGeomVars.Dispose(); PSSceneVars.Dispose(); PSGeomVars.Dispose(); terrainps.Dispose(); pncctvs.Dispose(); pnccttvs.Dispose(); pnccttxvs.Dispose(); pncctttxvs.Dispose(); pncctxvs.Dispose(); pnctttxvs.Dispose(); pncttxvs.Dispose(); disposed = true; }
public static void finalize0() { NoBlend.Dispose(); Addition.Dispose(); HalfAddition.Dispose(); Subtraction.Dispose(); Multiplication.Dispose(); Reverse.Dispose(); AlphaBlend.Dispose(); Wrap.Dispose(); Mirror.Dispose(); CullingOn.Dispose(); CullingOff.Dispose(); ZTestOn.Dispose(); ZTestOnWriteOff.Dispose(); ZTestOff.Dispose(); }
public void ShouldNotBeAbleToMutateStateObjectAfterBindingToGraphicsDevice() { var samplerState = new SamplerState(); // Can mutate before binding. DoAsserts(samplerState, Assert.DoesNotThrow); // Can't mutate after binding. gd.SamplerStates[0] = samplerState; DoAsserts(samplerState, d => Assert.Throws <InvalidOperationException>(d)); // Even after changing to different SamplerState, you still can't mutate a previously-bound object. gd.SamplerStates[0] = SamplerState.AnisotropicClamp; DoAsserts(samplerState, d => Assert.Throws <InvalidOperationException>(d)); samplerState.Dispose(); }