DirectX facts for kids
![]() |
|
Developer(s) | Microsoft |
---|---|
Initial release | September 30, 1995 |
Stable release |
12 Ultimate API / October 5, 2021
|
Operating system | Microsoft Windows, Windows Phone 8, Dreamcast, Xbox, Xbox 360, Xbox One, Xbox Series X and Series S, Linux (Gallium Nine) (DirectX 12 only, Exclusive to Windows Subsystem for Linux) |
Type | API |
Microsoft DirectX is a special set of tools, called application programming interfaces (APIs). These tools help computers handle things like video games and videos, especially on Microsoft computers and consoles.
The names of these tools originally started with "Direct," like Direct3D and DirectSound. The name DirectX was created as a short way to talk about all of them. The "X" stands for the different "Direct" tools. Later, when Microsoft made a gaming console, they used the "X" to name it the Xbox. This showed that the console used DirectX technology.
Direct3D is the part of DirectX that helps create 3D graphics. It is used a lot to make video games for Microsoft Windows computers and the Xbox consoles. Other programs also use Direct3D for things like design and engineering. Because Direct3D is so important, people often use "DirectX" and "Direct3D" to mean the same thing.
The DirectX software development kit (SDK) is a package for game developers. It includes special programs (runtime libraries) and instructions (documentation and headers) for writing code. In the past, games or users had to install these programs. However, since Windows 98, every version of Windows has included DirectX. The SDK is free for developers to download.
Contents
How DirectX Was Created
In late 1994, Microsoft was getting ready to release Windows 95, their new operating system. They wanted to make sure lots of programs could run on it. However, game developers were not happy. They found that Windows did not have the right features for games, which were easier to make on MS-DOS. Games often crashed on Windows 95 because of problems with graphics drivers. For example, Disney's Animated Storybook: The Lion King had many issues.
Three Microsoft employees, Alex St. John, Craig Eisler, and Eric Engstrom, decided to fix this. They wanted to create new tools that would let games use the computer's graphics hardware directly. Their secret project was called the "Manhattan Project." They hoped to make personal computers better for gaming than other video game consoles. Even though their bosses didn't think Windows would be good for games, these three worked hard on the project. They were even nicknamed the "Beastie Boys" because of their rebellious spirit.
They worked quickly, and within four months, they had the first set of tools ready. They showed these tools at the 1995 Game Developers Conference. The tools included:
- DirectDraw for 2D graphics.
- DirectSound for audio.
- DirectPlay for online multiplayer games.
- DirectInput for joysticks and game controllers.
- AutoPlay, which made games start automatically when you put in the CD.
These "Direct" tools were special because they bypassed the usual Windows 95 routines. They accessed the computer hardware more directly. The first version of DirectX was released in September 1995 as the Windows Game SDK.
To get more game makers to use DirectX, Microsoft even helped id Software port their popular games Doom and Doom 2 from MS-DOS to DirectX for free. The first game, Doom 95, came out in August 1996. It was the first game made with DirectX. Even Bill Gates appeared in ads for it!
DirectX 2.0 became a built-in part of Windows in mid-1996. Microsoft worked hard to promote DirectX to developers. Alex St. John even held a big event at the 1996 Computer Game Developers Conference with a Roman theme, including real lions! At this event, Microsoft showed off Direct3D and a multiplayer game called MechWarrior 2 being played online.
The DirectX team had to test each new version very carefully. They checked it with many different graphics cards, sound cards, and other computer parts to make sure everything worked together.
Before DirectX, Microsoft also supported OpenGL, another tool for 3D graphics. OpenGL was made to work on many different computer systems. Direct3D was Microsoft's own tool, mainly for games on Windows. Over time, a friendly "battle" happened between supporters of OpenGL and Direct3D. However, many game developers used OpenGL for graphics and combined it with other DirectX tools for sound or joysticks.
A special version of DirectX was used to create Microsoft's Xbox, Xbox 360, and Xbox One consoles. This Xbox API was similar to DirectX version 8.1. The Xbox was first called DirectXbox, but the name was shortened to Xbox.
In 2002, Microsoft released DirectX 9. This version allowed for much longer and more detailed graphics programs called shaders. Microsoft has continued to update DirectX, adding new features like DXR for realistic lighting in 2018.
DirectX Tools and Features
DirectX is made up of many different tools (APIs) that help games and other programs work well. Here are some of the main ones:
- Direct3D (D3D): This is the main tool for creating real-time 3D graphics in games.
- DXGI: Helps Direct3D work with graphics cards and monitors.
- Direct2D: Used for drawing 2D graphics.
- DirectWrite: Helps display text clearly.
- DirectCompute: Allows graphics cards to do general computing tasks, not just graphics.
- DirectX Diagnostics (DxDiag): A tool that helps you check your computer's DirectX parts, like audio and video drivers.
- XACT3: A tool for handling sounds in games.
- XAudio2: Another tool for handling sounds.
- DirectX Raytracing (DXR): A newer tool that creates very realistic lighting and reflections in games.
- DirectStorage: Helps games load data faster from storage.
- DirectML: Uses graphics cards to speed up machine learning and artificial intelligence.
- DirectSR: Helps improve game resolution using AI.
- Media Foundation: Includes tools like DirectX Video Acceleration for smooth video playback.
Some older DirectX tools are not used as much anymore, but they were important in the past:
- DirectDraw: An older 2D graphics tool, replaced by Direct2D.
- DirectInput: Used for keyboards, mice, and joysticks, now often replaced by XInput for Xbox controllers.
- DirectPlay: Used for network communication in games, now replaced by other online services.
- DirectSound: An older audio tool, replaced by XAudio2 and XACT3.
- DirectMusic: Used for playing music in games.
DirectX tools work like building blocks that programmers can use. Microsoft also provides a tool called "PIX" to help developers find and fix problems in their DirectX games.
DirectX Versions Over Time
DirectX 9: A Big Step Forward
Microsoft released DirectX 9 in 2002. This was a very important update for graphics on Windows computers. It worked with older Windows versions like Windows 98 and Windows XP. Even today, newer Windows versions still support DirectX 9 for older games.
A key new feature in DirectX 9 was Shader Model 2.0. This allowed games to have more complex and realistic graphics. It also made games run faster by using the computer's graphics card better. DirectX 9 also introduced HLSL, which made it easier for developers to create shaders.
DirectX 9.0c was an update released in 2004. It has been updated many times since then. Many games from the mid-2000s to early 2010s were made using DirectX 9. It became a standard for game developers. Some games still offer DirectX 9 as an option for older computers.
DirectX 10: Only for Newer Windows
DirectX 10 was a major update that came with Windows Vista in late 2006. It only worked on Windows Vista and newer versions. Older Windows versions like Windows XP could not run games that required DirectX 10.
Many older DirectX tools were updated or replaced in DirectX 10. For example, DirectInput was replaced by XInput. DirectX 10 also brought big improvements to how graphics were drawn, including Shader Model 4.
Direct3D 10.1 was a small update released with Windows Vista Service Pack 1 in 2008. It gave developers more control over image quality and added support for newer graphics card features.
DirectX 11: Better for Multi-Core Computers
Microsoft showed DirectX 11 in 2008. It was released with Windows 7 in 2009.
Key new features included GPGPU support (DirectCompute), which lets graphics cards do more than just graphics. It also added tessellation, which makes 3D models look more detailed. DirectX 11 also improved how it used multi-core processors, helping games run smoother. Direct3D 11 works with older DirectX 10.1 hardware, but you need newer hardware to use all the new features.
Several updates to DirectX 11 were released:
- DirectX 11.1 came with Windows 8 in 2012. It improved performance and added 3D support for games and videos.
- DirectX 11.2 came with Windows 8.1 in 2013. It added new features for 2D graphics and allowed parts of a scene to be rendered at different resolutions.
- DirectX 11.X was a special version for the Xbox One.
- DirectX 11.3 was released with Windows 10 in 2015.
DirectX 12: Faster and More Control
DirectX 12 was announced in 2014 and launched with Windows 10 in 2015.
The biggest change in DirectX 12 was giving game developers more direct control over the computer's graphics card. This helps games run much faster and use the computer's resources more efficiently. Other companies also created similar tools around this time, like AMD's Mantle and Apple's Metal.
DirectX 12 also allows games to use multiple graphics cards at the same time, even from different makers like AMD and Nvidia. This can make games run even better.
Many modern graphics cards from Nvidia, AMD, and Intel support DirectX 12. Early tests showed that DirectX 12 could make games run much faster and use less CPU power compared to DirectX 11. For example, the game Ashes of the Singularity was one of the first to use DirectX 12.
In March 2018, DXR was added to DirectX 12. This allows for very realistic lighting and reflections in games, making them look even more lifelike. In 2019, Microsoft even brought a special version of DirectX 12 to Windows 7 for certain games.
DirectX 12 Ultimate: Unifying Gaming Platforms
Microsoft introduced DirectX 12 Ultimate in March 2020. This version brings Windows 10 computers and the Xbox Series X consoles closer together. It means games can be developed more easily for both platforms. New features in Ultimate include an updated DirectX Raytracing (1.1), Variable Rate Shading (which lets developers control how detailed shading is), Mesh Shaders, and Sampler Feedback.
Compatibility with Hardware
Different versions of Windows support different versions of DirectX. This allows newer Windows versions to still run older games.
DirectX tools need to talk to your computer's hardware, like your graphics card. They do this using special programs called device drivers. Hardware makers write these drivers to work with DirectX. In the past, DirectX included many drivers, but now Windows Update helps you get the right drivers for your computer.
Before DirectX 10, newer DirectX versions could usually work with older drivers. But DirectX 10 changed things a lot. It needed new drivers that could handle its updated features.
DirectX 11 introduced "feature levels." This means that even if your graphics card doesn't support all of DirectX 11's newest features, it can still run games that use DirectX 11 by using the features it does support. This helps keep games working on a wider range of computers.
DirectX for Programmers
In 2002, Microsoft released "Managed DirectX" (MDX). This allowed programmers using languages like C# to use DirectX features more easily. However, development on MDX stopped.
Later, Microsoft created the XNA Framework. This was another way for programmers to make games using DirectX, especially for the Xbox 360. XNA made it simpler to combine DirectX with other game development tools. XNA was a free download for Windows XP. Unlike DirectX itself, XNA tools are not built into Windows; developers need to include them with their games.
Other groups have also created their own tools to help programmers use DirectX with different programming languages.
Other Options
DirectX is not the only set of tools for creating games and graphics. Some other popular options include OpenGL and its newer version Vulkan. There are also tools like SDL, Allegro, and OpenAL that help with graphics, sound, and other game features. Many of these alternatives can work on different types of computers, not just Windows.
See also
In Spanish: DirectX para niños
- ActiveX
- Direct3D
- DxDiag
- Graphics Device Interface (GDI)
- Graphics pipeline
- Simple DirectMedia Layer
- Timeout Detection and Recovery
- Vulkan