For example, a game written only for DirectX 11 wouldn’t run on Windows XP, where the latest available version is DirectX 9. When developers are developing games, they choose the DirectX versions they want to target. Windows 7 includes DirectX 11, and Windows 10 includes DirectX 12. Other non-game applications may use DirectX for features like 3D graphics. If they don’t, they use the cross-platform OpenGL or Vulkan APIs instead.
Many games on Windows use DirectX’s Direct3D for graphics. It’s a group of APIs (application programming interfaces) developers can use for 3D graphics, video, multimedia, sound, and gamepad features on Windows.