Direct X initialization
I understand what I'm about to ask is beyond the juristiction of this board, however I'm sure most people on here must know what I'm on about and ppl have been very helpful in the past!
I've been studying C++ for a while now and am beginning to look at using it to write Direct X programs (I already have a question and I'm right at the start lol). When initializing a direct 3D object I then use the createDevice method to create a device object for it. Despite trawling my tutorial book and internet pages noone seems to explain this simple point: what is a direct3D device object in relation to the actual direct3D object that was used to create it? From the limited information I've managed to gather, it sounds like the device object is used to manipulate the graphics in the master direct3d object itself? Does that sound right or have I missed the point?
Just making sure I understand this basic before I move on :-)
You can think of the Direct3D object as an interface that represents the actual physical device or the adapter. The object can then create one or more actual logical devices (more in the case of multi-head). If you look at the SDK you will see that the interface functions for IDirect3D9/10 are all about querying adapter related properties, etc. You cannot render anything with an IDirect3D9/10 interface pointer. You must obtain an IDirect3DDevice9/10 interface pointer in order to begin rendering.
You can keep the IDirect3D9/10 interface around if you want to but it's also perfectly acceptable and valid to release it right after you successfully create an IDirect3DDevice9/10 interface pointer.
The overlap between them is that you can call GetDeviceCaps() with an IDirect3D9/10 and an IDirect3DDevice9/10 interface pointer. However they differ in that you cannot specify the device type from the visibility of an IDirect3DDevice9/10 interface pointer since this was specified when you created the pointer via CreateDevice(). You also cannot specify the adapter ordinal with an IDirect3DDevice9/10 interface pointer.
To make matters more confusing you can use IDirect3D9/10ex in Vista.