1, Existing components of DirectX11
The API of DirectX is divided into several components, each showcasing different aspects of the system's functionality. Each set of APIs can be used independently, so we can freely add the features we need in the game according to our needs and choices. In the latest version of DirectX, many components have been updated, such as Direct3D. Other components maintain their existing functionality, but of course, there are also some abandoned components facing the fate of being removed. It is worth mentioning that each internal component in DirectX can independently upgrade to new features.
Below are the following introductions:
1. Direct2D .
Direct2D is used for drawing 2D graphics in Win32 applications. Direct2D is good at rendering high-performance vector graphics.
2. DirectWrite .
DirectWrite is used for font and text rendering in Direct2D applications.
3. DXGI .
DXGI (DirectX Graphics Infrastructure) is the DirectX graphics foundation used for the creation of Direct3D swap chains and enumeration of device adapters.
4. Direct3D .
Direct3D is used for all operations related to 3D graphics in DirectX. Direct3D can be regarded as the flagship API in DirectX, receiving the most attention and targeted updates from Microsoft, and it is also most well-known to the world. Most of the subsequent content in this column will focus on explaining Direct3D.
5. XAudio2 .
XAudio2 is an underlying audio processing API that was previously part of XDK (Xbox Development Kit) and currently belongs to DICTXSDK. XAudio2 replaces DirectSound. The initial version of XAudio was used for the first generation Xbox gaming console.
6. XACT3 .
XACT3 is a higher-level audio processing API built on top of XAudio2. XACT3 allows developers to use cross platform audio creation tools in their applications. If developers want to control the audio system from the bottom level or want to create their own higher-level audio system of type XACT3, they can use XAdio2 to complete various functions. XACT3, as discussed in Appendix B, is a very user-friendly game audio production tool from the supporting website as "Sound in DICTX".
7. XInput .
XInput is an API responsible for input functionality in XDK and DirectX SDK, used to handle input from Xbox 360 controllers. Basically, any command that can be used on Xbox 360 can be used on a PC, and XINput is an API that helps us perform input related operations on these devices. These devices not only include Xbox controllers, but also many other devices. It should be noted that XInput replaces the previous version of DirectInput.
Note: XAudio is a sound effects API that can only be used for Xbox gaming consoles. XAudio2, its successor, can be used for Xbox game consoles and Windows based PCs.
8. XNAMath .
The newly emerged XNA Math is not an API, but a math library that optimizes common operations in electronic games. XNA Math uses SIMD (Single Instruction MultipleData) to perform single instruction calls for multiple operations. The XNA Math library is suitable for Windows based PCs and Xbox 360. We will continue to explain the relevant content in the following content.
Note: XNAGameStudio is a DirectX based game development tool that allows us to use C # and NET programming language to write games for Xbox360 and Windows PC platforms. And XNA Math is the name of a math library in the DirectX SDK, which can be used independently of XNA Game Studio. We don't need to download the XNA Game Studio SDK when using XNA Math.
9. DirectCompute .
DirectCompute is a newly added API in DirectX 11 that supports general purpose multithreading computing for GPUs. GPU has the ability to handle multiple tasks in parallel, such as physics, video compression and decompression, audio processing, etc. Not all tasks are suitable for GPUs to complete, but for those that are, the possibilities are enormous. To learn more about DirectCompute, you can refer to relevant materials.
10. DirectSetup .
When we complete game development, we naturally need to present the finished product to users. DirectSetup provides us with the ability to install the latest version of DirectX on the user's computer. DirectSetup also has the function of checking the installed version number of DirectX.
11. Windows Games Explorer .
Windows Games Explorer is a new feature in Windows Vista and Windows 7 that allows game developers to showcase (test) their games on their operating systems. For example, the display of games, titles, ratings, descriptions, style boxes for specific areas, rating content (such as M for adults, T for teenagers, etc.), game data statistics and notifications, parental control, etc. The DirectX SDK provides a wealth of tutorials on how to use the game explorer for your own game, which is very useful for releasing a game. The following Figure 1 is a screenshot of the interface of Windows 7 Game Explorer on a light ink computer.
12. DirectInput .
DirectInput is an API that detects keyboard, mouse, and joystick inputs. Currently, Xinput is used for all game controllers. For keyboards and mice, we can use the Win32 function or use DirectInput. The following content will explain DirectInput. According to the DirectX SDK, DirectInput will continue to maintain its current form until it is replaced by new technologies.
2, Outdated DirectX components
1. DirectDraw .
DirectDraw was once used for 2D graphics rendering, and currently we can use Direct2D or Direct3D for 2D graphics rendering. In DirectX 8, DirectDraw was merged with Direct3D and renamed as DirectX Graphics.
Note: In earlier versions of DICTX, the 2D graphics drawing function was completed by DirectDraw. Because DirectDraw is no longer updated, it is best for us to complete the drawing of graphics in Direct3D and Direct2D.
2. DirectPlay .
DirectPlay is used for network feature configuration in online games, based on the UDP (User Datagram Protocol) protocol, and serves as a higher-level abstraction layer for network communication. At present, this API has been removed from DICTXSDK to facilitate better integration of games in Windows Live on PC and Xbox360 platforms.
3. DirectShow .
DirectShow is an API used for multimedia rendering and recording. DirectShow can play common video files and provide functions such as DVD video navigation menu. Currently, DirectShow is part of the Windows SDK and is no longer a part of the DirectX SDK. In addition, Microsoft's Media Foundations, which are available to Windows Vista and Windows 7 users, are also part of the Windows SDK. In electronic games, if you need to display scenes and video files that switch between CG, DirectShow can also be useful.
4. DirectMusic .
DirectMusic, which plays audio content in applications, has been removed in DirectX 7 and subsequent versions. DirectMusic provides a channel for communication with underlying audio and hardware, and has dominated numerous DirectX related tutorials for many years. Nowadays, in audio operations related to games and multimedia applications, we use XAudio2 (bottom layer) or XACT3 (top layer) to replace the tired DirectMusic that has been in service for many years.
5. DirectSoul .
DirectSound is another abandoned underlying audio API in DirectX, now replaced by XAudio2.