テクスチャ.BlendState = new SharpDX.Direct3D11.BlendState( dr.D3DDevice, BlendState );
//----------------
#endregion
+ #region " ラスタライザステート "
+ //----------------
+ var RSDesc = new SharpDX.Direct3D11.RasterizerStateDescription() {
+ FillMode = SharpDX.Direct3D11.FillMode.Solid, // 普通に描画する
+ CullMode = SharpDX.Direct3D11.CullMode.None, // 両面を描画する
+ IsFrontCounterClockwise = false, // 時計回りが表面
+ DepthBias = 0,
+ DepthBiasClamp = 0,
+ SlopeScaledDepthBias = 0,
+ IsDepthClipEnabled = true,
+ IsScissorEnabled = false,
+ IsMultisampleEnabled = false,
+ IsAntialiasedLineEnabled = false,
+ };
+ テクスチャ.RasterizerState = new SharpDX.Direct3D11.RasterizerState( dr.D3DDevice, RSDesc );
+ //----------------
+ #endregion
}
public static void 共有リソースを解放する()
{
+ テクスチャ.RasterizerState?.Dispose();
+ テクスチャ.BlendState?.Dispose();
テクスチャ.PixelShader?.Dispose();
テクスチャ.VertexShader?.Dispose();
- テクスチャ.BlendState?.Dispose();
}
protected static SharpDX.Direct3D11.VertexShader VertexShader = null;
protected static SharpDX.Direct3D11.PixelShader PixelShader = null;
protected static SharpDX.Direct3D11.BlendState BlendState = null;
+ protected static SharpDX.Direct3D11.RasterizerState RasterizerState = null;
// 個別項目
// ラスタライザ
d3dContext.Rasterizer.SetViewports( dr.ViewPort );
- d3dContext.Rasterizer.State = dr.RasterizerState;
+ d3dContext.Rasterizer.State = テクスチャ.RasterizerState;
// ピクセルシェーダ
d3dContext.PixelShader.Set( テクスチャ.PixelShader );
public SharpDX.Direct3D11.Texture2D DepthStencil => this.bs_DepthStencil;
public SharpDX.Direct3D11.DepthStencilView DepthStencilView => this.bs_DepthStencilView;
public SharpDX.Direct3D11.DepthStencilState DepthStencilState => this.bs_DepthStencilState;
- public SharpDX.Direct3D11.RasterizerState RasterizerState => this.bs_RasterizerState;
public SharpDX.Direct3D11.ShaderResourceView ShaderResourceView => this.bs_ShaderResourceView;
public SharpDX.Direct3D11.SamplerState SamplerState => this.bs_SamplerState;
protected SharpDX.Size2F ShaderResourceViewSize;
}
//----------------
#endregion
- #region " ラスタライザステート "
- //----------------
- var RSDesc = new SharpDX.Direct3D11.RasterizerStateDescription() {
- FillMode = SharpDX.Direct3D11.FillMode.Solid, // 普通に描画する
- CullMode = SharpDX.Direct3D11.CullMode.None, // 両面を描画する
- IsFrontCounterClockwise = false, // 時計回りが表面
- DepthBias = 0,
- DepthBiasClamp = 0,
- SlopeScaledDepthBias = 0,
- IsDepthClipEnabled = true,
- IsScissorEnabled = false,
- IsMultisampleEnabled = false,
- IsAntialiasedLineEnabled = false,
- };
- this.bs_RasterizerState = new SharpDX.Direct3D11.RasterizerState( this.bs_D3DDevice, RSDesc );
- //----------------
- #endregion
#region " 深度ステンシルステート "
//----------------
var DepthSencil = new SharpDX.Direct3D11.DepthStencilStateDescription() {
this.bs_DepthStencilState?.Dispose();
this.bs_SamplerState?.Dispose();
this.bs_ShaderResourceView?.Dispose();
- this.bs_RasterizerState?.Dispose();
this.bs_SwapChain?.Dispose();
this.bs_D3DDevice?.Dispose();
}
private SharpDX.DXGI.SwapChain bs_SwapChain = null;
private SharpDX.Mathematics.Interop.RawViewportF[] bs_ViewPort = new SharpDX.Mathematics.Interop.RawViewportF[ 1 ];
private SharpDX.Direct3D11.DepthStencilState bs_DepthStencilState = null;
- private SharpDX.Direct3D11.RasterizerState bs_RasterizerState = null;
private SharpDX.Direct3D11.ShaderResourceView bs_ShaderResourceView = null;
private SharpDX.Direct3D11.SamplerState bs_SamplerState = null;
private SharpDX.Direct3D11.RenderTargetView bs_RenderTargetView = null;