Commit 90937151 authored by Clark Lin's avatar Clark Lin
Browse files

add link for Direct3D APIs

parent 60ff92ea
...@@ -4,20 +4,20 @@ The whole picture of render pipeline includes: ...@@ -4,20 +4,20 @@ The whole picture of render pipeline includes:
| Part | Name | Description | Mandatory | Once / Repeat At | API Used | Sample | | 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() | [Draw Frame](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Frame) | | 1.1 | CreateDeviceAndSwapChain | Standard API to create 3 objects:<br/>**[ID3D11Device](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nn-d3d11-id3d11device)**<br/>**[ID3D11DeviceContext](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nn-d3d11-id3d11devicecontext)**<br/>**[IDXGISwapChain](https://learn.microsoft.com/en-us/windows/win32/api/dxgi/nn-dxgi-idxgiswapchain)** | Yes | Once | [D3D11CreateDeviceAndSwapChain()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-d3d11createdeviceandswapchain) | [Draw Frame](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Frame) |
| 1.2 | DefineRenderTargetView | Get back buffer from swapchain, then create target view using back buffer | Yes | Once | IDXGISwapChain->CreateRenderTargetView() | [Draw Frame](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Frame) | | 1.2 | DefineRenderTargetView | Get back buffer from swapchain, then create target view using back buffer | Yes | Once | [ID3D11Device->CreateRenderTargetView()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11device-createrendertargetview) | [Draw Frame](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Frame) |
| 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() | [Apply Depth Buffer](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Apply-Depth-Buffer) | | 1.3 | DefineDepthStencilView | Do this if depth testing or stencil testing required | No | Once | [ID3D11Device->CreateDepthStencilState()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11device-createdepthstencilstate)<br/>[ID3D11DeviceContext->OMSetDepthStencilState()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-omsetdepthstencilstate)<br/>[ID3D11Device->CreateTexture2D()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11device-createtexture2d)<br/>[ID3D11Device->CreateDepthStencilView()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11device-createdepthstencilview) | [Apply Depth Buffer](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Apply-Depth-Buffer) |
| 1.4 | DefineRenderTarget | Set render target view(and depth stencil) view as render target | Yes | Once | ID3D11DeviceContext->OMSetRenderTargets() | [Apply Depth Buffer](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Apply-Depth-Buffer) | | 1.4 | DefineRenderTarget | Set render target view(and depth stencil) view as render target | Yes | Once | [ID3D11DeviceContext->OMSetRenderTargets()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-omsetrendertargets) | [Apply Depth Buffer](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Apply-Depth-Buffer) |
| 2.1 | ClearRenderTargetView | Sets all the elements in a render target to one value | Yes | Frame | ID3D11DeviceContext->ClearRenderTargetView() | [Draw Frame](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Frame) | | 2.1 | ClearRenderTargetView | Sets all the elements in a render target to one value | Yes | Frame | [ID3D11DeviceContext->ClearRenderTargetView()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-clearrendertargetview) | [Draw Frame](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Frame) |
| 2.2 | ClearDepthStencilView | Clears the depth-stencil resource.<br/>Do this if depth testing or stencil testing required | No | Frame | ID3D11DeviceContext->ClearDepthStencilView() | [Apply Depth Buffer](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Apply-Depth-Buffer) | | 2.2 | ClearDepthStencilView | Clears the depth-stencil resource.<br/>Do this if depth testing or stencil testing required | No | Frame | [ID3D11DeviceContext->ClearDepthStencilView()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-cleardepthstencilview) | [Apply Depth Buffer](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Apply-Depth-Buffer) |
| 2.3 | DefineVertexBuffer | Define vertices array and create vertex buffer | Yes | Graphic object | ID3D11Device->CreateBuffer()<br/>ID3D11DeviceContext->IASetVertexBuffers() | [Draw Triangle](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Triangle) | | 2.3 | DefineVertexBuffer | Define vertices array and create vertex buffer | Yes | Graphic object | [ID3D11Device->CreateBuffer()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11device-createbuffer)<br/>[ID3D11DeviceContext->IASetVertexBuffers()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-iasetvertexbuffers) | [Draw Triangle](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Triangle) |
| 2.4 | DefineIndexBuffer | Define indices array and create index buffer | Yes | Graphic object | ID3D11Device->CreateBuffer()<br/>ID3D11DeviceContext->IASetIndexBuffer() | [Use Index Buffer](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Use-Index-Buffer) | | 2.4 | DefineIndexBuffer | Define indices array and create index buffer | Yes | Graphic object | [ID3D11Device->CreateBuffer()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11device-createbuffer)<br/>[ID3D11DeviceContext->IASetIndexBuffer()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-iasetindexbuffer) | [Use Index Buffer](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Use-Index-Buffer) |
| 2.5 | DefineTransConstBuffer | Define transformation array and create buffer, then bind it to vertex buffer | Yes | Graphic object | ID3D11Device->CreateBuffer()<br/>ID3D11DeviceContext->VSSetConstantBuffers() | [Draw Rotating Image](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Rotating-Image) | | 2.5 | DefineTransConstBuffer | Define transformation array and create buffer, then bind it to vertex buffer | Yes | Graphic object | [ID3D11Device->CreateBuffer()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11device-createbuffer)<br/>[ID3D11DeviceContext->VSSetConstantBuffers()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-vssetconstantbuffers) | [Draw Rotating Image](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Rotating-Image) |
| 2.6 | DefineColorConstBuffer | Define color array and create buffer, then bind it to vertex buffer | Yes | Graphic object | ID3D11Device->CreateBuffer()<br/>ID3D11DeviceContext->PSSetConstantBuffers() | [Draw Cube Color](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Cube-Color) | | 2.6 | DefineColorConstBuffer | Define color array and create buffer, then bind it to vertex buffer | Yes | Graphic object | [ID3D11Device->CreateBuffer()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11device-createbuffer)<br/>[ID3D11DeviceContext->PSSetConstantBuffers()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-pssetconstantbuffers) | [Draw Cube Color](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Cube-Color) |
| 2.7 | DefineVertexShader | Create vertex shader and bind it to device | Yes | Graphic object | ID3D11Device->CreateVertexShader()<br/>ID3D11DeviceContext->VSSetShader() | [Draw Triangle](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Triangle) | | 2.7 | DefineVertexShader | Create vertex shader and bind it to device | Yes | Graphic object | [ID3D11Device->CreateVertexShader()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11device-createvertexshader)<br/>[ID3D11DeviceContext->VSSetShader()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-vssetshader) | [Draw Triangle](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Triangle) |
| 2.8 | DefinePixelShader | Create pixel shader and bind it to device | Yes | Graphic object | ID3D11Device->CreatePixelShader()<br/>ID3D11DeviceContext->PSSetShader() | [Draw Triangle](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Triangle) | | 2.8 | DefinePixelShader | Create pixel shader and bind it to device | Yes | Graphic object | [ID3D11Device->CreatePixelShader()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11device-createpixelshader)<br/>[ID3D11DeviceContext->PSSetShader()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-pssetshader) | [Draw Triangle](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Triangle) |
| 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() | [Draw Triangle](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Triangle) | | 2.9 | DefineInputLayout | Create an input-layout object to describe the input-buffer data for the input-assembler stage | Yes | Graphic object | [ID3D11Device->CreateInputLayout()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11device-createinputlayout)<br/>[ID3D11DeviceContext->IASetInputLayout()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-iasetinputlayout) | [Draw Triangle](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Triangle) |
| 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() | [Draw Triangle](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Triangle) | | 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()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-iasetprimitivetopology) | [Draw Triangle](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Triangle) |
| 2.11 | DefineViewPorts | Bind an array of viewports to the rasterizer stage of the pipeline | Yes | Graphic object | ID3D11DeviceContext->RSSetViewports() | [Draw Frame](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Frame) | | 2.11 | DefineViewPorts | Bind an array of viewports to the rasterizer stage of the pipeline | Yes | Graphic object | [ID3D11DeviceContext->RSSetViewports()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-rssetviewports) | [Draw Frame](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Frame) |
| 2.12 | DrawPrimitive | Draw primitives | Yes | Graphic object | ID3D11DeviceContext->DrawIndexed() | [Use Index Buffer](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Use-Index-Buffer) | | 2.12 | DrawPrimitive | Draw primitives | Yes | Graphic object | [ID3D11DeviceContext->DrawIndexed()](https://learn.microsoft.com/en-us/windows/win32/api/d3d11/nf-d3d11-id3d11devicecontext-drawindexed) | [Use Index Buffer](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Use-Index-Buffer) |
| 3 | Present | Presents a rendered image to the user | Yes | Frame | IDXGISwapChain->Present method() | [Draw Frame](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Frame) | | 3 | Present | Presents a rendered image to the user | Yes | Frame | [IDXGISwapChain->Present()](https://learn.microsoft.com/en-us/windows/win32/api/dxgi/nf-dxgi-idxgiswapchain-present) | [Draw Frame](https://linyinghao.cn/gitlab/clark/studydx/-/wikis/Direct3D-11-Draw-Frame) |
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