Commit 8495954f authored by Clark Lin's avatar Clark Lin
Browse files

add process image of D3D11 render pipeline

parent 80fa0592
This project is used to study DX11
The whole picture of render pipeline includes:
| Part | Name | Description | Mandatory | Once / Repeat At | API Used | Sample |
| ------ | ------ | ------ | ------ | ------ | ------ | ------ |
| 1.1 | CreateDeviceAndSwapChain | Standard API to create 3 objects:<br/>**ID3D11Device**<br/>**ID3D11DeviceContext**<br/>**IDXGISwapChain** | Yes | Once | D3D11CreateDeviceAndSwapChain() | ------ |
| 1.2 | DefineRenderTargetView | Get back buffer from swapchain, then create target view using back buffer | Yes | Once | IDXGISwapChain->CreateRenderTargetView() | ------ |
| 1.3 | DefineDepthStencilView | Do this if depth testing or stencil testing required | No | Once | ID3D11Device->CreateDepthStencilState()<br/>ID3D11DeviceContext->OMSetDepthStencilState()<br/>ID3D11Device->CreateTexture2D()<br/>ID3D11Device->CreateDepthStencilView() | ------ |
| 1.4 | DefineRenderTarget | Set render target view(and depth stencil) view as render target | Yes | Once | ID3D11DeviceContext->OMSetRenderTargets() | ------ |
| 2.1 | ClearRenderTargetView | Sets all the elements in a render target to one value | Yes | Frame | ID3D11DeviceContext->ClearRenderTargetView() | ------ |
| 2.2 | ClearDepthStencilView | Clears the depth-stencil resource.<br/>Do this if depth testing or stencil testing required | No | Frame | ID3D11DeviceContext->ClearDepthStencilView() | ------ |
| 2.3 | DefineVertexBuffer | Define vertices array and create vertex buffer | Yes | Graphic object | ID3D11Device->CreateBuffer()<br/>ID3D11DeviceContext->IASetVertexBuffers() | ------ |
| 2.4 | DefineIndexBuffer | Define indices array and create index buffer | Yes | Graphic object | ID3D11Device->CreateBuffer()<br/>ID3D11DeviceContext->IASetIndexBuffer() | ------ |
| 2.5 | DefineTransConstBuffer | Define transformation array and create buffer, then bind it to vertex buffer | Yes | Graphic object | ID3D11Device->CreateBuffer()<br/>ID3D11DeviceContext->VSSetConstantBuffers() | ------ |
| 2.6 | DefineColorConstBuffer | Define color array and create buffer, then bind it to vertex buffer | Yes | Graphic object | ID3D11Device->CreateBuffer()<br/>ID3D11DeviceContext->PSSetConstantBuffers() | ------ |
| 2.7 | DefineVertexShader | Create vertex shader and bind it to device | Yes | Graphic object | ID3D11Device->CreateVertexShader()<br/>ID3D11DeviceContext->VSSetShader() | ------ |
| 2.8 | DefinePixelShader | Create pixel shader and bind it to device | Yes | Graphic object | ID3D11Device->CreatePixelShader()<br/>ID3D11DeviceContext->PSSetShader() | ------ |
| 2.9 | DefineInputLayout | Create an input-layout object to describe the input-buffer data for the input-assembler stage | Yes | Graphic object | ID3D11Device->CreateInputLayout()<br/>ID3D11DeviceContext->IASetInputLayout() | ------ |
| 2.10 | DefinePrimitiveTopology | Bind information about the primitive type, and data order that describes input data for the input assembler stage | Yes | Graphic object | ID3D11DeviceContext->IASetPrimitiveTopology() | ------ |
| 2.11 | DefineViewPorts | Bind an array of viewports to the rasterizer stage of the pipeline | Yes | Graphic object | ID3D11DeviceContext->RSSetViewports() | ------ |
| 2.12 | DrawPrimitive | Draw primitives | Yes | Graphic object | ID3D11DeviceContext->DrawIndexed() | ------ |
| 3 | Present | Presents a rendered image to the user | Yes | Frame | IDXGISwapChain->Present method() | ------ |
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment