Configure Environment
Download the Directx SDK (directx sdk june10 is sufficient) and create a new win32 empty project in VS (vs2013 is almost complete).
Then in the view -> Property Manager found Debug | W32-> Microsoft Cpp Wins2. user,
Double click and select VC++ Directory, set the path containing directory and library directory to include, lib x86 in the recently downloaded directx sdk directory
Select the linker, set additional dependencies, and paste the following code.
dxerr.lib
dxguid.lib
d3dx9d.lib
d3dx10d.lib
d3d9.lib
winmm.lib
comctl32.lib
Download the Tomato plugin (VA) and also add the include path of the dx SDK.
Configuration completed! No more burden.
Directx rendering system
Old version: Fixed function pipeline using functions encapsulated within directorx to change rendering state
New version: Programmable rendering pipeline shader, using HLSL (supporting CG functions) or shader assembly code (replaced by HLSL) for flexible rendering.
Directx Program Process
Create Win32 Window ->
initialization (Create directx interface - Verify hardware vertex operations - Fill D3DPRESENT-PARAMETER structure - Create directx device interface)
Middle -> Scene layout
Win32 Message Loop ->
Rendering (Clear cache -> Start drawing -> Draw -> End drawing -> Flip display).