Пример #1
0
        void SetSamplerState(WrapMode wrapMode, InterpolationMode interpolationMode)
        {
            if (wrapMode != currentWrapMode || interpolationMode != currentInterpolationMode)
            {
                D3D11.SamplerState newSamplerState = device.CreateSamplerState(wrapMode, interpolationMode);
                deviceContext.PixelShader.SetSampler(0, newSamplerState);

                samplerState.Dispose();
                samplerState             = newSamplerState;
                currentWrapMode          = wrapMode;
                currentInterpolationMode = interpolationMode;
            }
        }
Пример #2
0
 public void Dispose()
 {
     vertexBuffer.Dispose();
     vertexShader.Dispose();
     pixelShader.Dispose();
     inputLayout.Dispose();
     inputSignature.Dispose();
     worldViewProjBuffer.Dispose();
     samplerState.Dispose();
 }
Пример #3
0
 /// <summary>
 /// Disposes stuff
 /// </summary>
 /// <param name="disposing"></param>
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (state != null)
         {
             state.Dispose();
             state = null;
         }
     }
     base.Dispose(disposing);
 }
Пример #4
0
        public void Dispose()
        {
            samplerState.Dispose();

            constantBuffer.Dispose();
            vertexShader.Dispose();
            pixelShader.Dispose();

            trianglePositionVertexBuffer.Dispose();
            triangleTexcoordVertexBuffer.Dispose();

            inputLayout.Dispose();
        }
Пример #5
0
        public void Dispose()
        {
            rtvSdrTexture?.Dispose();
            textureSDRImage?.Dispose();

            inputLayout.Dispose();
            samplerState.Dispose();
            shaderInputSigVsQuad.Dispose();
            psToneMapping.Dispose();
            vsQuad.Dispose();

            wrtD3D11Device.Dispose();
            d3dDevice.Dispose();
            wicFactory.Dispose();
        }
Пример #6
0
        public void SetTextureAddressMode(TextureAddressMode textureAddressMode)
        {
            if(_currentTextureAddressMode == textureAddressMode)
            {
                return;
            }

            _currentTextureAddressMode = textureAddressMode;

            var samplerState = _textureSampler.GetSampler(0);
            var samplerStateDescription = samplerState.Description;
            var addressMode = GetAddressMode(textureAddressMode);

            samplerStateDescription.AddressU = addressMode;
            samplerStateDescription.AddressV = addressMode;

            var newSamplerState = new SamplerState(_device, samplerStateDescription);
            _textureSampler.SetSampler(0, newSamplerState);

            newSamplerState.Dispose();
            samplerState.Dispose();
        }
Пример #7
0
 public void Dispose()
 {
     _d3dSamplerState.Dispose();
 }