When developing games under Windows, everyone will associate it with DirectX. In fact, DirectX is not equivalent to a game, nor is it the only choice for writing game programs. In fact, DirectX only provides a more direct API library for controlling hardware. Of course, it is not just a graphics API, it also provides a complete set of multimedia interface solutions, but because it performs exceptionally well in 3D graphics, its other aspects are not displayed
DirectX first appeared in 1995, when it was known as the "GameSDK". In its original form, the target was to use C and C++ Developers. DirectX was initially developed to compensate for the lack of graphics and sound processing capabilities in Windows 3.1 systems. Today, it has become an interface that has a decisive impact on all aspects of the entire multimedia system
There are too many versions of DirectX, of course, starting from version 1.0
DirectX 1.0 DirectX 1.0 was the first program that could directly read hardware information. It provides more direct performance for reading graphics hardware (such as block movement on display cards) as well as basic sound and input device functions (functions), enabling developed games to accelerate 2D images. At this point, DirectX does not include all current 3D features and is still in its early stages
Of course, the first generation of DirectX was not very successful, and it was far behind graphics APIs like OpenGL. At the time of its launch, many hardware did not support it, and the lack of hardware support became the biggest obstacle to its popularity
In fact, before the emergence of graphical programming APIs, 3D applications completed the drawing of graphics by directly sending commands to the graphics hardware. Although this development work is relatively heavy, hardware efficiency can be largely guaranteed. Graphics APIs like DirectX and OpenGL serve as an intermediary between graphics hardware and applications, allowing applications to use unified graphics programming code to perform operations on underlying hardware, freeing programmers from nightmares of interacting with a large amount of graphics hardware
DirectX 2.0 DirectX 2.0 has made some improvements in 2D graphics, adding some dynamic effects and adopting Direct 3D technology. DirectX 2.0 uses two simulation methods, smooth simulation and RGB simulation, to accelerate the calculation of 3D images. At the same time, a more user-friendly settings program was adopted, and many issues with the application program interface were corrected. Starting from DirextX 2.0, the entire design architecture of DirectX has been basically formed. In this way, DirectX 2.0 is quite different from 1.0
DirectX 3.0 With the release of Windows 95, 3D games have also become deeply ingrained in people's hearts, and at the same time, DirectX has gradually gained recognition from software and hardware manufacturers. So Microsoft launched DirectX 3.0. In fact, at that time, Microsoft's DirectX had already divided the world with professional OpenGL interfaces and 3DFX's Glide interface, becoming one of the graphics interface standards at that time. At that time, 3DFX Company was the most powerful graphics card manufacturer, and its Glide interface naturally became the most widely used with the popularity of its graphics cards. But with the decline of 3DFX company and the decline of Voodoo graphics cards, the Glide interface gradually disappeared
DirectX 3.0 is a simple upgraded version of DirectX 2.0, with few changes and upgrades to DirectSound (for 3D sound functionality) and DirectPlay (for gaming/networking). DirectX 3.0 integrates relatively simple 3D effects and is not yet very mature
DirectX 5.0 For some unknown reason, Microsoft's new version did not follow 3.0 as DirectX 4.0, but went straight to 5.0. This version has made significant changes to Direct3D, adding 3D effects such as fog and alpha blending to enhance the sense of space and realism in 3D games, and also incorporating texture compression technology from S3. At the same time, it has also been strengthened in other components, with improvements made in sound cards and game controllers, supporting more devices. Therefore, it was not until DirectX 5.0 that DirectX truly matured. At this point, DirectX's performance is not inferior to other 3D APIs, and there is a strong trend of catching up
DirectX 6.0 When DirectX 6.0 was launched, one of its biggest competitors, Glide, had gradually declined, and DirectX had gained recognition from most manufacturers. DirectX 6.0 has added technologies such as bilinear filtering and trilinear filtering to optimize 3D image quality, and 3D technology in games has gradually entered a mature stage
DirectX 7.0 In fact, the development of DirectX technology and display card functionality is mutually reinforcing. The biggest feature of DirectX 7.0 is its support for T& L (Chinese name is "Coordinate Conversion and Light Source"). Any object in a 3D game has a coordinate, and when the object moves, its coordinates change, which refers to coordinate transformation. In 3D games, besides scenes and objects, there are also lights. Without lights, there is no representation of 3D objects. Whether it is real-time 3D games or 3D image rendering, 3D rendering with lights is the most resource consuming. Before the emergence of DirectX 7.0, both position conversion and lighting required a CPU for calculation, and the faster the CPU speed, the smoother the game performance. Used T& After the L function, the calculation of these two effects is performed using the GPU of the graphics card, which can free the CPU from busy labor
DirectX 8.0 The release of DirectX 8.0 can be said to have triggered another graphics card revolution, introducing the concept of "pixel rendering" for the first time, and equipped with pixel rendering engines (PS) and vertex rendering engines (VS), which are reflected in dynamic lighting effects. Same hardware T& Compared to the fixed light and shadow conversion achieved solely by L, VS and PS units have greater flexibility, making GPUs truly programmable processors. This means that programmers can greatly reduce the difficulty of building 3D scenes through them. Through VS and PS rendering, it is easy to construct realistic dynamic ripple light and shadow effects on water surfaces
DirectX 9.0 At the end of 2002, Microsoft released DirectX 9.0. DirectX 9.0 mainly includes two versions: DirectX 9.0b and DirectX 9.0c
The rendering accuracy of the PS unit in DirectX 9.0b has reached floating-point accuracy, compared to traditional hardware T& The L unit has also been cancelled. The programming of the all-new VertexShader (VertexShader Engine) will be much more complex than before. The new VertexShader standard has added process control, more constants, and the number of coloring instructions per program has increased to 1024. But fundamentally, 9.0 did not make significant changes to the architecture of 8.0, it only strengthened the functionality of pixel rendering engines and vertex rendering engines. PS2.0 has a fully programmable architecture that allows for real-time calculation of texture effects, dynamic texture mapping, and does not require graphics memory. In theory, it greatly improves the accuracy of material mapping resolution. In addition, PS1. x can only support 28 hardware instructions and operate on 6 materials simultaneously, while PS2.0 can support 160 hardware instructions and operate on 16 materials simultaneously. The new high-precision floating-point data specification can use multiple texture maps, and the number of operable instructions can be arbitrarily long, making it easy to achieve movie level display effects. VS2.0 significantly improves the VS performance of older versions (DirectX 8) by increasing the flexibility of Vertex programs. The new control instructions can replace the previously specialized individual coloring programs with general-purpose programs, improving efficiency by many times; Increase loop operation instructions, reduce working time, and improve processing efficiency; Expand the number of coloring instructions from 128 to 256
Compared to DirectX 9.0b and Sharder Model 2.0, the biggest improvement of DirectX 9.0c is the introduction of comprehensive support for Shader Model 3.0 (including Pixel Shader 3.0 and Vertex Shader 3.0 coloring language specifications). For example, the Shader Model 2.0 of DirectX 9.0b only supports a maximum of 256 instructions for Vertex Shader and 96 instructions for Pixel Shader. However, in Shader Model 3.0, the maximum instructions for Vertex Shader and Pixel Shader have both increased significantly to 65535, with new dynamic program flow control, displacement mapping, multiple rendering targets (MRT), subsurface scattering, and soft shadows New technological features such as environmental and ground shadows, global illumination, etc. immediately provide powerful impetus for the GeForce 6, GeForce 7 series, and Radeon X1000 series to move in a film and television quality environment for the next generation of games, as well as complex digital worlds and realistic characters with unparalleled realism and fantasy
In DirectX 9.0c, Shader Model 3.0 not only eliminates the instruction limit and adds new features such as displacement mapping, but also focuses more on improving game execution efficiency and quality. After the birth of Shader Model 3.0, people's attitude towards games has shifted from simply pursuing speed in the past to balancing game graphics quality and running speed
DirectX 10 Since its inception, DirectX has been plagued by a major issue, which is high CPU load. From a technical perspective, this CPU load has two negative impacts on 3D images: firstly, it limits the number of objects that can be drawn simultaneously in the image; Secondly, it limits the number of independent special effects that can be used in a scene. This greatly limits the number of details in the game graphics, and the main requirement for realistic images is rich details
The main advantage of DirectX 10 is the better and more rational utilization of GPU resources, thereby reducing dependence on CPU. It mainly achieves this goal through three ways: first, modify the API core to reduce the consumption of drawing objects and switching material effects, and improve drawing efficiency; Secondly, introduce new mechanisms to reduce the dependence of graphics operations on the CPU, allowing more operations to be completed in the GPU; Thirdly, enable a large number of objects to be drawn in bulk by calling a single DirectX drawing command. In addition, the introduction of a new Shader: Geometry Shader in Shader Model 4.0 in DirectX 10 is a major advancement in programmable graphics pipelines. It is the first time that GPU is allowed to dynamically generate and destroy geometric data. By combining with the new data stream output function, many algorithms that were previously impossible to implement can now be used in GPUs. Meanwhile, Vertex, Geometry, and Pixel shaders adopt a unified Shader architecture
DirectX 11 DirectX 11 is not a completely new application programming interface, but a superset of DirectX 10. Simply put, DirectX 11 is a technology developed based on DirectX 10/10.1, mainly expanding and enhancing the functionality of DirectX 10 and DirectX 10.1
Tessellation brings new programmable and fixed feature rendering processes that can provide stable high frame rates (speeds) and surface effects for both 3D games and modeling programs
Compute Shader is a new way to tap into hardware computing power, without many limitations. Its key features include inter thread data communication, a complete set of basic units for random access and streaming I/O operations, etc. It can accelerate and simplify existing technologies such as image and post-processing effects, and also prepares for new technologies in DX11 level hardware
DirectX first appeared in 1995, when it was known as the "GameSDK". In its original form, the target was to use C and C++ Developers. DirectX was initially developed to compensate for the lack of graphics and sound processing capabilities in Windows 3.1 systems. Today, it has become an interface that has a decisive impact on all aspects of the entire multimedia system
There are too many versions of DirectX, of course, starting from version 1.0
DirectX 1.0 DirectX 1.0 was the first program that could directly read hardware information. It provides more direct performance for reading graphics hardware (such as block movement on display cards) as well as basic sound and input device functions (functions), enabling developed games to accelerate 2D images. At this point, DirectX does not include all current 3D features and is still in its early stages
Of course, the first generation of DirectX was not very successful, and it was far behind graphics APIs like OpenGL. At the time of its launch, many hardware did not support it, and the lack of hardware support became the biggest obstacle to its popularity
In fact, before the emergence of graphical programming APIs, 3D applications completed the drawing of graphics by directly sending commands to the graphics hardware. Although this development work is relatively heavy, hardware efficiency can be largely guaranteed. Graphics APIs like DirectX and OpenGL serve as an intermediary between graphics hardware and applications, allowing applications to use unified graphics programming code to perform operations on underlying hardware, freeing programmers from nightmares of interacting with a large amount of graphics hardware
DirectX 2.0 DirectX 2.0 has made some improvements in 2D graphics, adding some dynamic effects and adopting Direct 3D technology. DirectX 2.0 uses two simulation methods, smooth simulation and RGB simulation, to accelerate the calculation of 3D images. At the same time, a more user-friendly settings program was adopted, and many issues with the application program interface were corrected. Starting from DirextX 2.0, the entire design architecture of DirectX has been basically formed. In this way, DirectX 2.0 is quite different from 1.0
DirectX 3.0 With the release of Windows 95, 3D games have also become deeply ingrained in people's hearts, and at the same time, DirectX has gradually gained recognition from software and hardware manufacturers. So Microsoft launched DirectX 3.0. In fact, at that time, Microsoft's DirectX had already divided the world with professional OpenGL interfaces and 3DFX's Glide interface, becoming one of the graphics interface standards at that time. At that time, 3DFX Company was the most powerful graphics card manufacturer, and its Glide interface naturally became the most widely used with the popularity of its graphics cards. But with the decline of 3DFX company and the decline of Voodoo graphics cards, the Glide interface gradually disappeared
DirectX 3.0 is a simple upgraded version of DirectX 2.0, with few changes and upgrades to DirectSound (for 3D sound functionality) and DirectPlay (for gaming/networking). DirectX 3.0 integrates relatively simple 3D effects and is not yet very mature
DirectX 5.0 For some unknown reason, Microsoft's new version did not follow 3.0 as DirectX 4.0, but went straight to 5.0. This version has made significant changes to Direct3D, adding 3D effects such as fog and alpha blending to enhance the sense of space and realism in 3D games, and also incorporating texture compression technology from S3. At the same time, it has also been strengthened in other components, with improvements made in sound cards and game controllers, supporting more devices. Therefore, it was not until DirectX 5.0 that DirectX truly matured. At this point, DirectX's performance is not inferior to other 3D APIs, and there is a strong trend of catching up
DirectX 6.0 When DirectX 6.0 was launched, one of its biggest competitors, Glide, had gradually declined, and DirectX had gained recognition from most manufacturers. DirectX 6.0 has added technologies such as bilinear filtering and trilinear filtering to optimize 3D image quality, and 3D technology in games has gradually entered a mature stage
DirectX 7.0 In fact, the development of DirectX technology and display card functionality is mutually reinforcing. The biggest feature of DirectX 7.0 is its support for T& L (Chinese name is "Coordinate Conversion and Light Source"). Any object in a 3D game has a coordinate, and when the object moves, its coordinates change, which refers to coordinate transformation. In 3D games, besides scenes and objects, there are also lights. Without lights, there is no representation of 3D objects. Whether it is real-time 3D games or 3D image rendering, 3D rendering with lights is the most resource consuming. Before the emergence of DirectX 7.0, both position conversion and lighting required a CPU for calculation, and the faster the CPU speed, the smoother the game performance. Used T& After the L function, the calculation of these two effects is performed using the GPU of the graphics card, which can free the CPU from busy labor
DirectX 8.0 The release of DirectX 8.0 can be said to have triggered another graphics card revolution, introducing the concept of "pixel rendering" for the first time, and equipped with pixel rendering engines (PS) and vertex rendering engines (VS), which are reflected in dynamic lighting effects. Same hardware T& Compared to the fixed light and shadow conversion achieved solely by L, VS and PS units have greater flexibility, making GPUs truly programmable processors. This means that programmers can greatly reduce the difficulty of building 3D scenes through them. Through VS and PS rendering, it is easy to construct realistic dynamic ripple light and shadow effects on water surfaces
DirectX 9.0 At the end of 2002, Microsoft released DirectX 9.0. DirectX 9.0 mainly includes two versions: DirectX 9.0b and DirectX 9.0c
The rendering accuracy of the PS unit in DirectX 9.0b has reached floating-point accuracy, compared to traditional hardware T& The L unit has also been cancelled. The programming of the all-new VertexShader (VertexShader Engine) will be much more complex than before. The new VertexShader standard has added process control, more constants, and the number of coloring instructions per program has increased to 1024. But fundamentally, 9.0 did not make significant changes to the architecture of 8.0, it only strengthened the functionality of pixel rendering engines and vertex rendering engines. PS2.0 has a fully programmable architecture that allows for real-time calculation of texture effects, dynamic texture mapping, and does not require graphics memory. In theory, it greatly improves the accuracy of material mapping resolution. In addition, PS1. x can only support 28 hardware instructions and operate on 6 materials simultaneously, while PS2.0 can support 160 hardware instructions and operate on 16 materials simultaneously. The new high-precision floating-point data specification can use multiple texture maps, and the number of operable instructions can be arbitrarily long, making it easy to achieve movie level display effects. VS2.0 significantly improves the VS performance of older versions (DirectX 8) by increasing the flexibility of Vertex programs. The new control instructions can replace the previously specialized individual coloring programs with general-purpose programs, improving efficiency by many times; Increase loop operation instructions, reduce working time, and improve processing efficiency; Expand the number of coloring instructions from 128 to 256
Compared to DirectX 9.0b and Sharder Model 2.0, the biggest improvement of DirectX 9.0c is the introduction of comprehensive support for Shader Model 3.0 (including Pixel Shader 3.0 and Vertex Shader 3.0 coloring language specifications). For example, the Shader Model 2.0 of DirectX 9.0b only supports a maximum of 256 instructions for Vertex Shader and 96 instructions for Pixel Shader. However, in Shader Model 3.0, the maximum instructions for Vertex Shader and Pixel Shader have both increased significantly to 65535, with new dynamic program flow control, displacement mapping, multiple rendering targets (MRT), subsurface scattering, and soft shadows New technological features such as environmental and ground shadows, global illumination, etc. immediately provide powerful impetus for the GeForce 6, GeForce 7 series, and Radeon X1000 series to move in a film and television quality environment for the next generation of games, as well as complex digital worlds and realistic characters with unparalleled realism and fantasy
In DirectX 9.0c, Shader Model 3.0 not only eliminates the instruction limit and adds new features such as displacement mapping, but also focuses more on improving game execution efficiency and quality. After the birth of Shader Model 3.0, people's attitude towards games has shifted from simply pursuing speed in the past to balancing game graphics quality and running speed
DirectX 10 Since its inception, DirectX has been plagued by a major issue, which is high CPU load. From a technical perspective, this CPU load has two negative impacts on 3D images: firstly, it limits the number of objects that can be drawn simultaneously in the image; Secondly, it limits the number of independent special effects that can be used in a scene. This greatly limits the number of details in the game graphics, and the main requirement for realistic images is rich details
The main advantage of DirectX 10 is the better and more rational utilization of GPU resources, thereby reducing dependence on CPU. It mainly achieves this goal through three ways: first, modify the API core to reduce the consumption of drawing objects and switching material effects, and improve drawing efficiency; Secondly, introduce new mechanisms to reduce the dependence of graphics operations on the CPU, allowing more operations to be completed in the GPU; Thirdly, enable a large number of objects to be drawn in bulk by calling a single DirectX drawing command. In addition, the introduction of a new Shader: Geometry Shader in Shader Model 4.0 in DirectX 10 is a major advancement in programmable graphics pipelines. It is the first time that GPU is allowed to dynamically generate and destroy geometric data. By combining with the new data stream output function, many algorithms that were previously impossible to implement can now be used in GPUs. Meanwhile, Vertex, Geometry, and Pixel shaders adopt a unified Shader architecture
DirectX 11 DirectX 11 is not a completely new application programming interface, but a superset of DirectX 10. Simply put, DirectX 11 is a technology developed based on DirectX 10/10.1, mainly expanding and enhancing the functionality of DirectX 10 and DirectX 10.1
Tessellation brings new programmable and fixed feature rendering processes that can provide stable high frame rates (speeds) and surface effects for both 3D games and modeling programs
Compute Shader is a new way to tap into hardware computing power, without many limitations. Its key features include inter thread data communication, a complete set of basic units for random access and streaming I/O operations, etc. It can accelerate and simplify existing technologies such as image and post-processing effects, and also prepares for new technologies in DX11 level hardware