public void End() { var command = new D3D11Command { Type = CommandType.End }; _commandList.Add(command); }
public void SetIndexBuffer(IIndexBuffer indexBuffer) { var command = new D3D11Command { Type = CommandType.SetIndexBuffer, IndexBuffer = (D3D11IndexBuffer)indexBuffer }; _commandList.Add(command); }
public void SetDepthStencilState(IDepthStencilState depthStencilState) { var command = new D3D11Command { Type = CommandType.SetDepthStencilState, DepthStencilState = (D3D11DepthStencilState)depthStencilState }; _commandList.Add(command); }
public void SetInputLayout(IInputLayout inputLayout) { var command = new D3D11Command { Type = CommandType.SetInputLayout, InputLayout = (D3D11InputLayout)inputLayout }; _commandList.Add(command); }
public void SetScissorRectangle(Rectangle rectangle) { var command = new D3D11Command { Type = CommandType.SetScissor, ScissorRectangle = rectangle.ToSharpDX() }; _commandList.Add(command); }
public void SetRasterizerState(IRasterizerState rasterizerState) { var command = new D3D11Command { Type = CommandType.SetRasterizerState, RasterizerState = (D3D11RasterizerState)rasterizerState }; _commandList.Add(command); }
public void SetPrimitiveTopology(PrimitiveTopology primitiveTopology) { var command = new D3D11Command { Type = CommandType.SetPrimitiveTopology, PrimitiveTopology = primitiveTopology }; _commandList.Add(command); }
public void SetBlendState(IBlendState blendState) { var command = new D3D11Command { Type = CommandType.SetBlendState, BlendState = (D3D11BlendState)blendState }; _commandList.Add(command); }
public void Draw(int vertexCount) { var command = new D3D11Command { Type = CommandType.Draw, VertexCount = vertexCount }; _commandList.Add(command); }
public void SetVertexShader(IShader vertexShader) { var command = new D3D11Command { Type = CommandType.SetVertexShader, VertexShader = (VertexShader)(D3D11Shader)vertexShader }; _commandList.Add(command); }
public void SetViewport(Viewport viewport) { var command = new D3D11Command { Type = CommandType.SetViewport, Viewport = viewport.ToSharpDX(), }; _commandList.Add(command); }
public void SetPixelShader(IShader pixelShader) { var command = new D3D11Command { Type = CommandType.SetPixelShader, PixelShader = (PixelShader)(D3D11Shader)pixelShader }; _commandList.Add(command); }
public void SetVertexBuffer(IVertexBuffer vertexBuffer) { var command = new D3D11Command { Type = CommandType.SetVertexBuffer, VertexBufferBinding = ((D3D11VertexBuffer)vertexBuffer).GetVertexBufferBinding() }; _commandList.Add(command); }
public void SetRenderTargets(TextureView[] renderTargets, TextureView depthStencilView) { var command = new D3D11Command { Type = CommandType.SetRenderTargets, RenderTargets = renderTargets.Select(rt => (RenderTargetView)(D3D11TextureView)rt).ToArray() }; _commandList.Add(command); }
public void ClearRenderTarget(TextureView renderTarget, Vector4 clearColor) { var command = new D3D11Command { Type = CommandType.ClearRenderTarget, RenderTarget = (D3D11TextureView)renderTarget, RenderTargetClearColor = new RawColor4(clearColor.X, clearColor.Y, clearColor.Z, clearColor.W) }; _commandList.Add(command); }
public void SetConstantBuffer(IConstantBuffer buffer, BufferScope bufferScope) { var command = new D3D11Command { Type = CommandType.SetConstantBuffers, ConstantBufferScope = bufferScope, ConstantBuffer = (D3D11ConstantBuffer)buffer }; _commandList.Add(command); }
public void SetRenderTarget(TextureView renderTarget, TextureView depthStencilView) { var command = new D3D11Command { Type = CommandType.SetRenderTarget, RenderTarget = (D3D11TextureView)renderTarget, RenderTargetDepthStencil = (D3D11TextureView)depthStencilView }; _commandList.Add(command); }
public void DrawIndexed(int indexCount, int indexOffset, int vertexOffset) { var command = new D3D11Command { Type = CommandType.DrawIndexed, IndexCount = indexCount, IndexOffset = indexOffset, VertexOffset = vertexOffset }; _commandList.Add(command); }
public void ClearDepthStencil(TextureView depthStencilView, float depthClear, byte depthClearStencil) { var command = new D3D11Command { Type = CommandType.ClearDepthStencil, RenderTargetDepthStencil = (D3D11TextureView)depthStencilView, DepthClear = depthClear, DepthClearStencil = depthClearStencil }; _commandList.Add(command); }
public void SetTexture(TextureView textureView) { var command = new D3D11Command { Type = CommandType.SetTextures, Textures = new[] { (ShaderResourceView)(D3D11TextureView)textureView }, TexturesStartSlot = 0, TextureCount = 1 }; _commandList.Add(command); }
public void SetSampler(ISampler sampler) { var command = new D3D11Command { Type = CommandType.SetSamplers, Samplers = new[] { (SamplerState)(D3D11Sampler)sampler }, SamplerCount = 1, SamplersStartSlot = 0 }; _commandList.Add(command); }
public void Begin(string passName, IPipeline pipeline) { var command = new D3D11Command { Type = CommandType.Begin, PassName = passName }; _commandList.Add(command); if (pipeline != null) { SetBlendState(pipeline.BlendState); SetDepthStencilState(pipeline.DepthStencilState); SetRasterizerState(pipeline.RasterizerState); SetInputLayout(pipeline.InputLayout); SetVertexShader(pipeline.VertexShader); SetPixelShader(pipeline.PixelShader); SetPrimitiveTopology(pipeline.PrimitiveTopology); SetViewport(pipeline.Viewport); } }