I want to learn Direct3D from codesampler.
But this website can't open recently.
Is there anyone know how to download the sample code from this website, thanks in advance.
It looks like
www.codesampler.com has lost their domain registry, and the Internet Archive Wayback Machine hasn't found that website since late 2016. It's probably just gone.
If you are looking to learn Direct3D today, you should focus on Direct3D 11. It's supported for Win32 classic desktop apps on Windows 7, Windows Vista SP2, Windows 8.x, and Windows 10. It's also supported on Xbox One and Universal Windows Platform apps. Direct3D 11 development is fully supported in modern versions of Visual Studio, and all the headers and the HLSL compiler you need are part of the Windows 8.x SDK and the Windows 10 SDK--you don't need to use the legacy DirectX SDK at all. You can find Direct3D 11 supporting replacements for all the deprecated D3DX library functionality as well.
Where is the DirectX SDK (2015 Edition)?
Living without D3DX
DirectX SDK Samples Catalog
DirectX SDK Tools Catalog
There are indeed numerous resources online for learning Direct3D 11. Keep in mind that many of the Direct3D 11 learning resources were written prior to the deprecation of the legacy DirectX SDK, so they tend to focus on deprecated support code like
D3DX11. I'd recommend starting with the DirectX Tool Kit for DirectX 11 tutorials, and once you work through those you can go back to resources like the rastertek.com tutorials knowing what's deprecated and what's not.
Getting Started with Direct3D 11
Direct3D 12 is also supported on Windows 10, Xbox One, and for the Universal Windows Platform, but it's an expert API that assumes you are already an expert on Direct3D 11. See Getting Started with Direct3D 12 and DirectX Tool Kit for DirectX 12.
Direct3D 10.x is fully replaced by Direct3D 11. There's no need to use Direct3D 10.x at all on any platform. Direct3D 11 supports all the Direct3D 10.x era hardware and more through the Direct3D hardware Feature Level mechanism, and is available on all supported versions of Windows that had Direct3D 10.x.
Direct3D 9 is a legacy API, and while its still supported for application compatibility purposes, a lot of the behavior is emulated on modern versions of the OS. Debugging and development support for Direct3D 9 on modern versions of Windows is minimal. Furthermore, the only place to get samples and utility libraries for Direct3D 9 is the legacy DirectX SDK. The only case where it makes sense to use Direct3D 9 for an application is if you have to target Windows XP Service Pack 3 or Windows Server 2003 Service Pack 2. See this post for some important information on this scenario.