IDirect3DDevice9 interface (d3d9helper.h)

Applications use the methods of the IDirect3DDevice9 interface to perform DrawPrimitive-based rendering, create resources, work with system-level variables, adjust gamma ramp levels, work with palettes, and create shaders.

Inheritance

The IDirect3DDevice9 interface inherits from the IUnknown interface. IDirect3DDevice9 also has these types of members:

Methods

The IDirect3DDevice9 interface has these methods.

 
IDirect3DDevice9::BeginScene

The IDirect3DDevice9::BeginScene method (d3d9.h) begins a scene.
IDirect3DDevice9::BeginStateBlock

The IDirect3DDevice9::BeginStateBlock method (d3d9.h) signals Direct3D to begin recording a device-state block.
IDirect3DDevice9::Clear

The IDirect3DDevice9::Clear method (d3d9.h) clears one or more surfaces such as a render target, multiple render targets, a stencil buffer, or a depth buffer.
IDirect3DDevice9::ColorFill

The IDirect3DDevice9::ColorFill method (d3d9.h) allows an application to fill a rectangular area of a D3DPOOL_DEFAULT surface with a specified color.
IDirect3DDevice9::CreateAdditionalSwapChain

The IDirect3DDevice9::CreateAdditionalSwapChain method (d3d9.h) creates an additional swap chain for rendering multiple views.
IDirect3DDevice9::CreateCubeTexture

The IDirect3DDevice9::CreateCubeTexture method (d3d9helper.h) creates a cube texture resource.
IDirect3DDevice9::CreateDepthStencilSurface

The IDirect3DDevice9::CreateDepthStencilSurface method (d3d9helper.h) creates a depth-stencil resource.
IDirect3DDevice9::CreateIndexBuffer

The IDirect3DDevice9::CreateIndexBuffer method (d3d9helper.h) creates an index buffer.
IDirect3DDevice9::CreateOffscreenPlainSurface

The IDirect3DDevice9::CreateOffscreenPlainSurface method (d3d9helper.h) creates an off-screen surface.
IDirect3DDevice9::CreatePixelShader

The IDirect3DDevice9::CreatePixelShader method (d3d9.h) creates a pixel shader.
IDirect3DDevice9::CreateQuery

The IDirect3DDevice9::CreateQuery method (d3d9helper.h) creates a status query.
IDirect3DDevice9::CreateRenderTarget

The IDirect3DDevice9::CreateRenderTarget method (d3d9helper.h) creates a render-target surface.
IDirect3DDevice9::CreateStateBlock

The IDirect3DDevice9::CreateStateBlock method (d3d9helper.h) creates a new state block containing the values for all device states, vertex-related states, or pixel-related states.
IDirect3DDevice9::CreateTexture

The IDirect3DDevice9::CreateTexture method (d3d9helper.h) creates a texture resource.
IDirect3DDevice9::CreateVertexBuffer

The IDirect3DDevice9::CreateVertexBuffer method (d3d9helper.h) creates a vertex buffer.
IDirect3DDevice9::CreateVertexDeclaration

The IDirect3DDevice9::CreateVertexDeclaration method (d3d9helper.h) creates a vertex shader declaration from the device and the vertex elements.
IDirect3DDevice9::CreateVertexShader

The IDirect3DDevice9::CreateVertexShader method (d3d9helper.h) creates a vertex shader.
IDirect3DDevice9::CreateVolumeTexture

The IDirect3DDevice9::CreateVolumeTexture method (d3d9helper.h) creates a volume texture resource.
IDirect3DDevice9::DeletePatch

The IDirect3DDevice9::DeletePatch method (d3d9helper.h) frees a cached high-order patch.
IDirect3DDevice9::DrawIndexedPrimitive

The IDirect3DDevice9::DrawIndexedPrimitive method (d3d9helper.h) renders the specified geometric primitive into an array of vertices.
IDirect3DDevice9::DrawIndexedPrimitiveUP

The IDirect3DDevice9::DrawIndexedPrimitiveUP method (d3d9helper.h) renders the specified geometric primitive with data specified by a user memory pointer.
IDirect3DDevice9::DrawPrimitive

The IDirect3DDevice9::DrawPrimitive method (d3d9helper.h) renders a sequence of non-indexed, geometric primitives of the specified type from the current set of data input streams.
IDirect3DDevice9::DrawPrimitiveUP

The IDirect3DDevice9::DrawPrimitiveUP method (d3d9helper.h) renders data specified by a user memory pointer as a sequence of geometric primitives of the specified type.
IDirect3DDevice9::DrawRectPatch

The IDirect3DDevice9::DrawRectPatch method (d3d9helper.h) draws a rectangular patch using the currently set streams.
IDirect3DDevice9::DrawTriPatch

The IDirect3DDevice9::DrawTriPatch method (d3d9.h) draws a triangular patch using the currently set streams.
IDirect3DDevice9::EndScene

The IDirect3DDevice9::EndScene method (d3d9.h) ends a scene that was begun by calling IDirect3DDevice9::BeginScene.
IDirect3DDevice9::EndStateBlock

The IDirect3DDevice9::EndStateBlock method (d3d9.h) signals Direct3D to stop recording a device-state block and retrieve a pointer to the state block interface.
IDirect3DDevice9::EvictManagedResources

The IDirect3DDevice9::EvictManagedResources method (d3d9.h) evicts all managed resources, including both Direct3D and driver-managed resources.
IDirect3DDevice9::GetAvailableTextureMem

The IDirect3DDevice9::GetAvailableTextureMem method (d3d9.h) returns an estimate of the amount of available texture memory.
IDirect3DDevice9::GetBackBuffer

The IDirect3DDevice9::GetBackBuffer method (d3d9.h) retrieves a back buffer from the device's swap chain.
IDirect3DDevice9::GetClipPlane

The IDirect3DDevice9::GetClipPlane method (d3d9.h) retrieves the coefficients of a user-defined clipping plane for the device.
IDirect3DDevice9::GetClipStatus

The IDirect3DDevice9::GetClipStatus method (d3d9.h) retrieves the clip status.
IDirect3DDevice9::GetCreationParameters

The IDirect3DDevice9::GetCreationParameters method (d3d9.h) retrieves the creation parameters of the device.
IDirect3DDevice9::GetCurrentTexturePalette

The IDirect3DDevice9::GetCurrentTexturePalette method (d3d9.h) retrieves the current texture palette.
IDirect3DDevice9::GetDepthStencilSurface

The IDirect3DDevice9::GetDepthStencilSurface method (d3d9.h) gets the depth-stencil surface owned by the Direct3DDevice object.
IDirect3DDevice9::GetDeviceCaps

The IDirect3DDevice9::GetDeviceCaps method (d3d9.h) retrieves the capabilities of the rendering device.
IDirect3DDevice9::GetDirect3D

The IDirect3DDevice9::GetDirect3D method (d3d9.h) returns an interface to the instance of the Direct3D object that created the device.
IDirect3DDevice9::GetDisplayMode

The IDirect3DDevice9::GetDisplayMode method (d3d9.h) retrieves the display mode's spatial resolution, color resolution, and refresh frequency.
IDirect3DDevice9::GetFrontBufferData

The IDirect3DDevice9::GetFrontBufferData method (d3d9.h) generates a copy of the device's front buffer and places that copy in a system memory buffer provided by the application.
IDirect3DDevice9::GetFVF

The IDirect3DDevice9::GetFVF method (d3d9.h) gets the fixed vertex function declaration.
IDirect3DDevice9::GetGammaRamp

The IDirect3DDevice9::GetGammaRamp method (d3d9.h) retrieves the gamma correction ramp for the swap chain.
IDirect3DDevice9::GetIndices

The IDirect3DDevice9::GetIndices method (d3d9.h) retrieves index data.
IDirect3DDevice9::GetLight

The IDirect3DDevice9::GetLight method (d3d9.h) retrieves a set of lighting properties that this device uses.
IDirect3DDevice9::GetLightEnable

The IDirect3DDevice9::GetLightEnable method (d3d9.h) retrieves the activity status of enabled or disabled, for a set of lighting parameters within a device.
IDirect3DDevice9::GetMaterial

The IDirect3DDevice9::GetMaterial method (d3d9.h) retrieves the current material properties for the device.
IDirect3DDevice9::GetNPatchMode

The IDirect3DDevice9::GetNPatchMode method (d3d9.h) gets the N-patch mode segments.
IDirect3DDevice9::GetNumberOfSwapChains

The IDirect3DDevice9::GetNumberOfSwapChains method (d3d9.h) gets the number of implicit swap chains.
IDirect3DDevice9::GetPaletteEntries

The IDirect3DDevice9::GetPaletteEntries method (d3d9.h) retrieves palette entries.
IDirect3DDevice9::GetPixelShader

The IDirect3DDevice9::GetPixelShader method (d3d9.h) retrieves the currently set pixel shader.
IDirect3DDevice9::GetPixelShaderConstantB

The IDirect3DDevice9::GetPixelShaderConstantB method (d3d9.h) gets a Boolean shader constant.
IDirect3DDevice9::GetPixelShaderConstantF

The IDirect3DDevice9::GetPixelShaderConstantF method (d3d9.h) gets a floating-point shader constant.
IDirect3DDevice9::GetPixelShaderConstantI

The IDirect3DDevice9::GetPixelShaderConstantI method (d3d9.h) gets an integer shader constant.
IDirect3DDevice9::GetRasterStatus

The IDirect3DDevice9::GetRasterStatus method (d3d9.h) returns information describing the raster of the monitor on which the swap chain is presented.
IDirect3DDevice9::GetRenderState

The IDirect3DDevice9::GetRenderState method (d3d9.h) retrieves a render-state value for a device.
IDirect3DDevice9::GetRenderTarget

The IDirect3DDevice9::GetRenderTarget method (d3d9.h) retrieves a render-target surface.
IDirect3DDevice9::GetRenderTargetData

The IDirect3DDevice9::GetRenderTargetData method (d3d9.h) copies the render-target data from device memory to system memory.
IDirect3DDevice9::GetSamplerState

The IDirect3DDevice9::GetSamplerState method (d3d9.h) gets the sampler state value.
IDirect3DDevice9::GetScissorRect

The IDirect3DDevice9::GetScissorRect method (d3d9.h) gets the scissor rectangle.
IDirect3DDevice9::GetSoftwareVertexProcessing

the IDirect3DDevice9::GetSoftwareVertexProcessing method (d3d9.h) gets the vertex hardware or software processing mode.
IDirect3DDevice9::GetStreamSource

The IDirect3DDevice9::GetStreamSource method (d3d9.h) retrieves a vertex buffer bound to the specified data stream.
IDirect3DDevice9::GetStreamSourceFreq

The IDirect3DDevice9::GetStreamSourceFreq method (d3d9.h) gets the stream source frequency divider value.
IDirect3DDevice9::GetSwapChain

The IDirect3DDevice9::GetSwapChain method (d3d9.h) gets a pointer to a swap chain.
IDirect3DDevice9::GetTexture

The IDirect3DDevice9::GetTexture method (d3d9.h) retrieves a texture assigned to a stage for a device.
IDirect3DDevice9::GetTextureStageState

The IDirect3DDevice9::GetTextureStageState method (d3d9.h) retrieves a state value for an assigned texture.
IDirect3DDevice9::GetTransform

The IDirect3DDevice9::GetTransform method (d3d9.h) retrieves a matrix describing a transformation state.
IDirect3DDevice9::GetVertexDeclaration

The IDirect3DDevice9::GetVertexDeclaration method (d3d9.h) gets a vertex shader declaration.
IDirect3DDevice9::GetVertexShader

The IDirect3DDevice9::GetVertexShader method (d3d9.h) retrieves the currently set vertex shader.
IDirect3DDevice9::GetVertexShaderConstantB

The IDirect3DDevice9::GetVertexShaderConstantB method (d3d9.h) gets a Boolean vertex shader constant.
IDirect3DDevice9::GetVertexShaderConstantF

The IDirect3DDevice9::GetVertexShaderConstantF method (d3d9.h) gets a floating-point vertex shader constant.
IDirect3DDevice9::GetVertexShaderConstantI

The IDirect3DDevice9::GetVertexShaderConstantI method (d3d9.h) gets an integer vertex shader constant.
IDirect3DDevice9::GetViewport

The IDirect3DDevice9::GetViewport method (d3d9.h) retrieves the viewport parameters currently set for the device.
IDirect3DDevice9::LightEnable

The IDirect3DDevice9::LightEnable method (d3d9.h) enables or disables a set of lighting parameters within a device.
IDirect3DDevice9::MultiplyTransform

The IDirect3DDevice9::MultiplyTransform method (d3d9.h) multiplies a device's world, view, or projection matrices by a specified matrix.
IDirect3DDevice9::Present

The IDirect3DDevice9::Present method (d3d9.h) presents the contents of the next buffer in the sequence of back buffers owned by the device.
IDirect3DDevice9::ProcessVertices

The IDirect3DDevice9::ProcessVertices method (d3d9.h) applies the vertex processing defined by the vertex shader to the set of input data streams.
IDirect3DDevice9::Reset

The IDirect3DDevice9::Reset method (d3d9.h) resets the type, size, and format of the swap chain.
IDirect3DDevice9::SetClipPlane

The IDirect3DDevice9::SetClipPlane method (d3d9.h) sets the coefficients of a user-defined clipping plane for the device.
IDirect3DDevice9::SetClipStatus

The IDirect3DDevice9::SetClipStatus method (d3d9.h) sets the clip status.
IDirect3DDevice9::SetCurrentTexturePalette

The IDirect3DDevice9::SetCurrentTexturePalette method (d3d9.h) sets the current texture palette.
IDirect3DDevice9::SetCursorPosition

The IDirect3DDevice9::SetCursorPosition method (d3d9.h) sets the cursor position and update options.
IDirect3DDevice9::SetCursorProperties

The IDirect3DDevice9::SetCursorProperties method (d3d9.h) sets properties for the cursor.
IDirect3DDevice9::SetDepthStencilSurface

The IDirect3DDevice9::SetDepthStencilSurface method (d3d9.h) sets the depth stencil surface.
IDirect3DDevice9::SetDialogBoxMode

The IDirect3DDevice9::SetDialogBoxMode method (d3d9.h) allows the use of GDI dialog boxes in full-screen mode applications.
IDirect3DDevice9::SetFVF

The IDirect3DDevice9::SetFVF method (d3d9.h) sets the current vertex stream declaration.
IDirect3DDevice9::SetGammaRamp

The IDirect3DDevice9::SetGammaRamp method (d3d9helper.h) sets the gamma correction ramp for the implicit swap chain.
IDirect3DDevice9::SetIndices

The IDirect3DDevice9::SetIndices method (d3d9helper.h) sets index data.
IDirect3DDevice9::SetLight

The IDirect3DDevice9::SetLight method (d3d9helper.h) assigns a set of lighting properties for this device.
IDirect3DDevice9::SetMaterial

The IDirect3DDevice9::SetMaterial method (d3d9helper.h) sets the material properties for the device.
IDirect3DDevice9::SetNPatchMode

The IDirect3DDevice9::SetNPatchMode method (d3d9helper.h) enables or disables N-patches.
IDirect3DDevice9::SetPaletteEntries

IDirect3DDevice9::SetPaletteEntries method (d3d9helper.h) sets palette entries.
IDirect3DDevice9::SetPixelShader

The IDirect3DDevice9::SetPixelShader method (d3d9helper.h) sets the current pixel shader to a previously created pixel shader.
IDirect3DDevice9::SetPixelShaderConstantB

The IDirect3DDevice9::SetPixelShaderConstantB method (d3d9helper.h) sets a Boolean shader constant.
IDirect3DDevice9::SetPixelShaderConstantF

The IDirect3DDevice9::SetPixelShaderConstantF method (d3d9helper.h) sets a floating-point shader constant.
IDirect3DDevice9::SetPixelShaderConstantI

The IDirect3DDevice9::SetPixelShaderConstantI method (d3d9helper.h) sets an integer shader constant.
IDirect3DDevice9::SetRenderState

The IDirect3DDevice9::SetRenderState method (d3d9helper.h) sets a single device render-state parameter.
IDirect3DDevice9::SetRenderTarget

The IDirect3DDevice9::SetRenderTarget method (d3d9helper.h) sets a new color buffer for the device.
IDirect3DDevice9::SetSamplerState

The IDirect3DDevice9::SetSamplerState method (d3d9helper.h) sets the sampler state value.
IDirect3DDevice9::SetScissorRect

The IDirect3DDevice9::SetScissorRect method (d3d9helper.h) sets the scissor rectangle.
IDirect3DDevice9::SetSoftwareVertexProcessing

The IDirect3DDevice9::SetSoftwareVertexProcessing method (d3d9helper.h) switches between software and hardware vertex processing.
IDirect3DDevice9::SetStreamSource

The IDirect3DDevice9::SetStreamSource method (d3d9helper.h) binds a vertex buffer to a device data stream.
IDirect3DDevice9::SetStreamSourceFreq

The IDirect3DDevice9::SetStreamSourceFreq method (d3d9helper.h) sets the stream source frequency divider value.
IDirect3DDevice9::SetTexture

The IDirect3DDevice9::SetTexture method (d3d9helper.h) assigns a texture to a stage for a device.
IDirect3DDevice9::SetTextureStageState

IDirect3DDevice9::SetTextureStageState method (d3d9helper.h) sets the state value for the currently assigned texture.
IDirect3DDevice9::SetTransform

The IDirect3DDevice9::SetTransform method (d3d9helper.h) sets a single device transformation-related state.
IDirect3DDevice9::SetVertexDeclaration

The IDirect3DDevice9::SetVertexDeclaration method (d3d9helper.h) sets a Vertex Declaration (Direct3D 9).
IDirect3DDevice9::SetVertexShader

The IDirect3DDevice9::SetVertexShader method (d3d9helper.h) sets the vertex shader.
IDirect3DDevice9::SetVertexShaderConstantB

The IDirect3DDevice9::SetVertexShaderConstantB method (d3d9helper.h) sets a Boolean vertex shader constant.
IDirect3DDevice9::SetVertexShaderConstantF

The IDirect3DDevice9::SetVertexShaderConstantF method (d3d9helper.h) sets a floating-point vertex shader constant.
IDirect3DDevice9::SetVertexShaderConstantI

The IDirect3DDevice9::SetVertexShaderConstantI method (d3d9helper.h) sets an integer vertex shader constant.
IDirect3DDevice9::SetViewport

The IDirect3DDevice9::SetViewport method (d3d9helper.h) sets the viewport parameters for the device.
IDirect3DDevice9::ShowCursor

The IDirect3DDevice9::ShowCursor method (d3d9helper.h) displays or hides the cursor.
IDirect3DDevice9::StretchRect

The IDirect3DDevice9::StretchRect method (d3d9helper.h) copies the contents of the source rectangle to the destination rectangle.
IDirect3DDevice9::TestCooperativeLevel

The IDirect3DDevice9::TestCooperativeLevel method (d3d9helper.h) reports the current cooperative-level status of the Direct3D device for a windowed or full-screen application.
IDirect3DDevice9::UpdateSurface

The IDirect3DDevice9::UpdateSurface method (d3d9helper.h) copies rectangular subsets of pixels from one surface to another.
IDirect3DDevice9::UpdateTexture

The IDirect3DDevice9::UpdateTexture method (d3d9helper.h) updates the dirty portions of a texture.
IDirect3DDevice9::ValidateDevice

The IDirect3DDevice9::ValidateDevice method (d3d9helper.h) reports the device's ability to render the current texture-blending operations and arguments in a pass.

Remarks

The IDirect3DDevice9 interface is obtained by calling the IDirect3D9::CreateDevice method.

This interface, like all COM interfaces, inherits the IUnknown interface methods.

The LPDIRECT3DDEVICE9 and PDIRECT3DDEVICE9 types are defined as pointers to the IDirect3DDevice9 interface.


typedef struct IDirect3DDevice9 *LPDIRECT3DDEVICE9, *PDIRECT3DDEVICE9;

Requirements

Requirement Value
Target Platform Windows
Header d3d9helper.h (include D3D9.h)

See also

Direct3D Interfaces

IDirect3D9::CreateDevice