游戏和多媒体应用程序是您可以为您的 PC 获得的一些最令人满意的程序,但让它们正常运行并不总是那么容易。首先(First),PC 架构从未设计为游戏平台。其次(Second),PC 的广泛性意味着一个人的机器可以与另一个人的机器不同。虽然游戏机都包含类似的硬件,但巨大的差异可能会让游戏头疼。
为了尽可能减轻痛苦,微软(Microsoft)需要引入一个所有游戏和多媒体应用程序都可以遵循的通用标准——操作系统和安装在 PC 上的任何硬件之间的通用接口,如果你愿意的话。这个通用接口是DirectX,这可能是很多混乱的根源。
什么是 DirectX 12
DirectX是一个界面,旨在让游戏开发人员和我们其他想要坐下来玩最新大片的人更轻松地完成某些编程任务。
DirectX 历史
任何游戏都需要一次又一次地执行某些任务。它需要监视来自鼠标、操纵杆或键盘的输入,并且需要能够显示屏幕图像并播放声音或音乐。这几乎是最简单级别的任何游戏。
从本质上讲,游戏程序员从根本上直接与您的 PC 硬件对话。当微软(Microsoft)推出Windows时,PC 平台的稳定性和成功势在必行,让开发者和玩家都变得更容易。毕竟,当他们每次开始开发新游戏时都必须重新发明轮子时,谁会为机器编写游戏而烦恼呢?微软(Microsoft)的想法很简单:停止程序员直接与硬件对话,并构建一个他们可以使用的通用工具包。DirectX诞生了。
DirectX 是如何工作的?
在最基本的层面上,DirectX是 PC 中的硬件与Windows本身之间的接口,是Windows API或应用程序编程接口(Application Programming Interface)的一部分。让我们看一个实际的例子。当游戏开发者想要播放声音文件时,只需使用正确的库函数即可。当游戏运行时,它会调用DirectX API,然后播放声音文件。
开发人员不需要知道他正在处理什么类型的声卡,它的能力,或者如何与之交谈。Microsoft提供了DirectX,声卡制造商提供了支持DirectX的驱动程序。他要求播放声音,它是——无论它在哪台机器上运行。
最初,DirectX最初只是一个简单的工具包:早期的硬件有限,只需要最基本的图形功能。随着硬件和软件的复杂性不断发展,DirectX也是如此。它现在不仅仅是一个图形工具包,而且这个术语已经涵盖了处理各种硬件通信的大量例程。
例如,DirectInput例程可以处理各种输入设备,从简单的两键鼠标到复杂的飞行操纵杆。其他部分包括用于音频设备的DirectSound ,而(DirectSound)DirectPlay提供了用于在线或多人游戏的工具包。
DirectX 版本
Windows 10(Windows 10)中 DirectX的当前版本是DirectX 12。Windows(DirectX 12.) 7 有DirectX 11。在Windows Vista中,它是版本 10(Version 10),而在 XP 中,它默认是 9.0。这可在从Windows 98 到并包括Windows Servers的所有(Windows Servers)Windows版本以及其间的每个修订版上运行。对于Windows 95和Windows NT 4,它需要特定版本的DirectX 3.0a。对核心DirectX代码的改进意味着当您升级到最新版本的 直连(DirectX)。下载(Downloading)和安装DirectX也不需要很复杂。
升级 DirectX
所有可用版本的Windows都以一种或另一种形式附带DirectX,作为无法删除的核心系统组件,因此您应该始终至少在 PC 上安装系统的基本实现。但是,许多新游戏需要最新版本才能正常运行,甚至。
通常,安装最新 DirectX(install the latest DirectX)的最佳位置是来自Microsoft或Windows Update。最新版本是 DirectX 12 Ultimate。DirectX的另一个好来源是游戏本身。如果游戏需要特定版本,它将位于安装 CD 上,甚至可能由游戏安装程序本身自动安装。不过,由于 Microsoft 的许可条款,您不会在杂志封面光盘上找到它。
诊断 DirectX 问题
诊断 DirectX 安装(Diagnosing problems with a DirectX installation)问题可能会有问题。值得庆幸的是,Microsoft提供了一个有用的实用程序,称为DirectX 诊断工具(DirectX Diagnostic Tool),尽管这并不明显。您不会在任何版本的Windows的“(Windows)开始”菜单(Start Menu)中找到此工具,并且每个版本都倾向于将其安装在不同的位置。
最简单的使用方法是打开“开始”菜单, 在搜索栏中输入 dxdiag(dxdiag),然后单击“确定”。当应用程序首次加载时,需要几秒钟来询问您的DirectX安装并发现任何问题。首先(First),DirectX 文件(DirectX Files)选项卡显示您的安装使用的每个文件的版本信息。底部的注释部分值得检查,因为丢失或损坏的文件将在此处标记。(Notes)
标记为Display、Sound、Music、Input和Network的选项卡都与(Network)DirectX的特定区域相关,并且除了Input选项卡之外的所有选项卡都提供了测试硬件是否正常运行的工具。
最后,“更多帮助(More Help)”选项卡提供了一种有用的方式来启动DirectX 疑难解答,这是 Microsoft 针对许多常见DirectX问题的简单线性问题解决工具。
我们希望您发现这篇文章内容丰富。
What is DirectX? How does it work? Versions, History, Troubleshooting
Gaming and multimedia applications are some of thе most satisfying programs you can get for your PC, but getting them to run properly isn’t always as easy as it could be. First, the PC architecture was never designed as a gaming platform. Second, the PC’s wide-ranging nature means that one person’ѕ machine can be dіfferеnt from another. While game consoles all contain similar hardware, the massivе range оf differenсes can make gaming а headache.
To alleviate as much pain as possible, Microsoft needed to introduce a common standard that all games and multimedia applications could follow – a common interface between the OS and whatever hardware is installed on the PC if you like. This common interface is DirectX, something which can be the source of much confusion.
What is DirectX 12
DirectX is an interface designed to make certain programming tasks much easier for both the game developer and the rest of us who want to sit down and play the latest blockbuster.
DirectX history
Any game needs to perform certain tasks again and again. It needs to watch for your input from mouse, joystick, or keyboard, and it needs to be able to display screen images and play sounds or music. That’s pretty much any game at the most simplistic level.
Essentially, the game programmers were talking directly to your PC’s hardware at a fundamental level. When Microsoft introduced Windows, it was imperative for the PC platform’s stability and success that things were made easier for both the developer and the player. After all, who would bother writing games for a machine when they had to reinvent the wheel every time they began work on a new game? Microsoft’s idea was simple: stop programmers talking directly to the hardware and build a common toolkit which they could use instead. DirectX was born.
How DirectX works?
At the most basic level, DirectX is an interface between the hardware in your PC and Windows itself, part of the Windows API or Application Programming Interface. Let’s look at a practical example. When a game developer wants to play a sound file, it’s simply a case of using the correct library function. When the game runs, this calls the DirectX API, which in turn plays the sound file.
The developer doesn’t need to know what type of sound card he’s dealing with, what it’s capable of, or how to talk to it. Microsoft has provided DirectX, and the sound card manufacturer has provided a DirectX-capable driver. He asks for the sound to be played, and it is – whichever machine it runs on.
Originally, DirectX began life as a simple toolkit: early hardware was limited, and only the most basic graphical functions were required. As hardware and software have evolved in complexity, so has DirectX. It’s now much more than a graphical toolkit, and the term has come to encompass a massive selection of routines that deal with all sorts of hardware communication.
For example, the DirectInput routines can deal with all sorts of input devices, from simple two-button mice to complex flight joysticks. Other parts include DirectSound for audio devices, and DirectPlay provides a toolkit for online or multiplayer gaming.
DirectX versions
The current version of DirectX in Windows 10 is DirectX 12. Windows 7 had DirectX 11. In Windows Vista, it is Version 10 & in XP, it is 9.0 by default. This runs on all Windows versions from Windows 98 up to and including Windows Servers, along with every revision in between. For Windows 95 and Windows NT 4, it requires a specific version of DirectX 3.0a. Improvements to the core DirectX code mean you may even see improvements in many titles when you upgrade to the latest build of DirectX. Downloading and installing DirectX need not be complex, either.
Upgrading DirectX
All available versions of Windows come with DirectX in one form or another as a core system component that cannot be removed, so you should always have at least a basic implementation of the system installed on your PC. However, many new games require the latest version before they work properly, or even.
Generally, the best place to install the latest DirectX is from Microsoft or Windows Update. The latest version is DirectX 12 Ultimate. Another good source for DirectX is the games themselves. If a game requires a specific version, it’ll be on the installation CD and may even be installed automatically by the game’s installer itself. You won’t find it on magazine cover discs, though, thanks to Microsoft’s licensing terms.
Diagnosing DirectX problems
Diagnosing problems with a DirectX installation can be problematic. Thankfully, Microsoft provides a useful utility called the DirectX Diagnostic Tool, although this isn’t obvious. You won’t find this tool in the Start Menu with any version of Windows, and each tends to install it in a different place.
The easiest way to use it is to open the Start Menu’s, type in dxdiag in the search bar, and then click OK. When the application first loads, it takes a few seconds to interrogate your DirectX installation and find any problems. First, the DirectX Files tab displays version information on each one of the files your installation uses. The Notes section at the bottom is worth checking, as missing or corrupted files will be flagged here.
The tabs marked Display, Sound, Music, Input, and Network all relate to specific areas of DirectX, and all but the Input tab provides tools to test the correct functioning on your hardware.
Finally, the More Help tab provides a useful way to start the DirectX Troubleshooter, Microsoft’s simple linear problem-solving tool for many common DirectX issues.
We hope that you find this post informative.