DmitryKo
Veteran
That's surely a momentous task, but what's the actual point of this investigation, considering that dgVoodoo2 emulation is doing very well?I had it wrong all along; spent days testing dozens of games without realizing it.
I've been trying to clean them up, starting with D3D8.
I'd imagine this information is only required if you need to build a retro PC with 15 year old components from late 2000s and run that specific software in an actual installation of Windows XP; and maybe 25 year old parts from early 2000s to run it in an actual installation of Windows 9x/ME...
Well, the DirectX 8.1b redistributable package does incorporate all the previously released DirectX runtimes for Windows95/98/ME and Windows 2000/XP, so game developers just shipped the most recent redistributable package from the latest DirectX SDK.there are quite a few games that require or come with DirectX 8 or 8.1 installers, and yet do not even touch d3d8.dll.
Since Windows Vista, DirectX has become the OS component and the driver model has changed to WDDM/DXGK, so major changes like the new DirectX/DXGI version would only ship as an OS update, and the redistributable DirectX package only contains the updated D3DCompiler.
all D3D2-6 games will request the same IID_IDirect3D3 interface. As you've wrtitten above one should look at what devices are being created/initialized after that to figure out which specific D3D version is being used.
Did you mean
IDrect3D
/IDirect3DDevice
? Because iDrect3D3
/IDirect3DDevice3
interfaces are from the DirectX SDK 6.0.Again, Direct3D applications would only query for an interface when they really need to use methods available from that specific interface, i.e. multitexturing and vertex buffers from a Direct3D 6.0 device. While it is technically possible to first create
IDrect3DDevice
rendering device, then query it for IDrect3DDevice2
or IDrect3DDevice3
interfaces - or vice versa, create IDrect3DDevice3
device, then query for IDrect3DDevice2
interface (except for IDrect3DDevice7
, which doesn't inherit from any of the legacy interfaces), it is pointless to query for a specific interface when you do not intend to use rendering methods provided by that inerface.Imagine I would request a
IDrect3DDevice2
(Direct3D 5.0) interface, so I could use IDrect3DDevice2::SetRenderTarget
and IDrect3DDevice2::DrawPrimitive
, but the user only has Direct3D 3.0 runtime installed, so my query will result in an error. Then I have to either fall back to
IDrect3DDevice
and IDrect3DDevice::Execute
some ExecuteBuffer
s, or throw an error and make the user install the DirectX 5.0 redistributable package (and probably buy a better videocard that supports the DrawPrimitive DDI).If this user has the DirectX 6.0 runtime installed, then my query for
IDrect3DDevice2
will also succeed. And if the user has a compliant Direct3D 6.0 video card which supports multitexturing, I could also query for iDrect3DDevice3
(to use multitexturing capabilities without having to fall back to multi-pass rendering) and it will succeed as well.FYI, IID is "interface identifier", similar to CLSID for a COM class. This is a private variable containing an unique identifier (a 128-bit Microsoft GUID). The "interface" would be
IDrect3D
/IDirect3DDevice
, i.e. the the entire COM class complete with public member functions (COM "methods") and private variables. DirectX uses "lightweight COM" model, so it consistently implements IUnknown interface and the QueryInterface method, which looks for a matching IID among all of its inherited interfaces. Since IDrect3D3
(Direct3D 6.0) interface does inherit from iDrect3D2
(Direct3D 5.0) interface and iDrect3D
(Direct3D 2.0/3.0) interface, it is possible to create one device type and then query it with an interface ID to a different device type.