Microsoft® Direct3D® 通过硬件抽象层 HAL 提供了设备无关性。HAL 是一个与设备相关的接口,他由设备制造商提供,Direct3D 通过他直接控制显示设备。应用程序不会直接与 HAL 打交道。相反,通过 HAL 提供的特性,Direct3D 暴露了一系列接口和方法用于应用程序绘制图形。在 Microsoft Windows® XP 、Microsoft Windows NT® 和 Windows 2000 中,设备制造商用 32 位编码实现了 HAL 。在 Windows 98 和 Windows Millennium Edition (Windows Me) 中混合使用 16 位或者 32 位编码。HAL 可以是显示驱动程序的一部分,也可以是一个动态连接库(DLL),他们都可以通过驱动程序开发人员定义的私有接口与显卡驱动进行通信。
Microsoft® Direct3D® provides device independence through the hardware abstraction layer (HAL). The HAL is a device-specific interface, provided by the device manufacturer, that Direct3D uses to work directly with the display hardware. Applications never interact with the HAL. Rather, with the infrastructure that the HAL provides, Direct3D exposes a consistent set of interfaces and methods that an application uses to display graphics. The device manufacturer implements the HAL using 32-bit code with Microsoft Windows® XP, Microsoft Windows NT®, and Windows 2000. Windows 98 and Windows Millennium Edition (Windows Me) use a combination of 16-bit and 32-bit code. The HAL can be part of the display driver or a separate dynamic-link library (DLL) that communicates with the display driver through a private interface that the driver's creator defines.
Direct3D HAL 由芯片制造商、板卡生产者或者原始设备制造商(OEM)实现。HAL 实现了设备依赖的代码,但是并不做任何的模拟。也就是说,如果硬件并不提供某一个功能,HAL 并不将其声明为硬件的能力。另外,HAL 并不验证参数;Direct3D 在调用 HAL 以前就已经完成了这项操作。
The Direct3D HAL is implemented by the chip manufacturer, board producer, or OEM. The HAL implements only device-dependent code and performs no emulation. If a function is not performed by the hardware, the HAL does not report it as a hardware capability. Additionally, the HAL does not validate parameters; Direct3D does this before the HAL is invoked.
在 Microsoft DirectX® 9.0 中,HAL 有三种的顶点处理方式:软件顶点处理、硬件顶点处理和同一设备的混合顶点处理。纯设备方式是 HAL 设备的另一种形式,他只提供硬件顶点处理,同时允许应用程序查看设备小部分的状态。另外,纯设备方式只在具备最低级能力的适配器上才可用。
In Microsoft DirectX® 9.0, the HAL can have three different vertex processing modes: software vertex processing, hardware vertex processing, and mixed vertex processing on the same device. The pure device mode is a variant of the HAL device. The pure device type supports hardware vertex processing only, and allows only a small subset of the device state to be queried by the application. In addition, the pure device is available only on adapters that have a minimum level of capabilities.