IDirect3DDevice3

The IDirect3DDevice3 interface provides methods enabling applications to perform DrawPrimitive-based rendering; this is in contrast to the IDirect3DDevice interface, which applications use to work with execute buffers. You can create a Direct3DDevice object and retrieve a pointer to this interface by calling the IDirect3D3::CreateDevice method.

For a conceptual overview, see Direct3D Devices and The DrawPrimitive Methods.

The methods of the IDirect3DDevice3 interface can be organized into the following groups:

Information GetCaps
  GetDirect3D
GetStats
Miscellaneous ComputeSphereVisibility
  MultiplyTransform
Getting and Setting States GetClipStatus
  GetCurrentViewport
GetLightState
GetRenderState
GetRenderTarget
GetTransform
SetClipStatus
SetCurrentViewport
SetLightState
SetRenderState
SetRenderTarget
SetTransform
Rendering Begin
  BeginIndexed
DrawIndexedPrimitive
  DrawIndexedPrimitiveStrided
DrawIndexedPrimitiveVB
DrawPrimitive
  DrawPrimitiveStrided
DrawPrimitiveVB
End
Index
Vertex
Scenes BeginScene
  EndScene
Textures EnumTextureFormats
  GetTexture
GetTextureStageState
SetTexture
SetTextureStageState
ValidateDevice
Viewports AddViewport
  DeleteViewport
NextViewport

The IDirect3DDevice3 interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

IUnknown AddRef
  QueryInterface
Release

This interface extends the IDirect3DDevice2 interface by adding methods to support more flexible vertex formats, vertex buffers, and visibility computation. Note that all of the viewport-related methods in this interface accept slightly different parameters than their counterparts in the IDirect3DDevice2 interface. Wherever an IDirect3DDevice2 interface method might accept an IDirect3DViewport2 interface pointer as a parameter, the methods in the IDirect3DDevice3 interface accept an IDirect3DViewport3 interface pointer instead.

This interface is not intended to be used with execute buffers, and therefore does not contain any execute-buffer related methods. If you need to use some of the methods in the IDirect3DDevice interface that are not supported in IDirect3DDevice2 or IDirect3DDevice3, you can call IDirect3DDevice2::QueryInterface to retrieve a pointer to an IDirect3DDevice interface.

You can use the LPDIRECT3DDEVICE2 or LPDIRECT3DDEVICE3 data types to declare a variable that contains a pointer to an IDirect3DDevice2 or IDirect3DDevice3 interface. The D3d.h header file declares these data types with the following code:

typedef struct IDirect3DDevice2    *LPDIRECT3DDEVICE2;
typedef struct IDirect3DDevice3    *LPDIRECT3DDEVICE3;
 

QuickInfo

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in d3d.h.
  Import Library: Use ddraw.lib.

See Also

Direct3D Devices, Rendering