Export (0) Print
Expand All
Expand Minimize

IDirect3DDevice9 interface

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.

Members

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

Methods

The IDirect3DDevice9 interface has these methods.

MethodDescription
BeginScene

Begins a scene.

BeginStateBlock

Signals Direct3D to begin recording a device-state block.

Clear

Clears one or more surfaces such as a render target, multiple render targets, a stencil buffer, and a depth buffer.

ColorFill

Allows an application to fill a rectangular area of a D3DPOOL_DEFAULT surface with a specified color.

CreateAdditionalSwapChain

Creates an additional swap chain for rendering multiple views.

CreateCubeTexture

Creates a cube texture resource.

CreateDepthStencilSurface

Creates a depth-stencil resource.

CreateIndexBuffer

Creates an index buffer.

CreateOffscreenPlainSurface

Create an off-screen surface.

CreatePixelShader

Creates a pixel shader.

CreateQuery

Creates a status query.

CreateRenderTarget

Creates a render-target surface.

CreateStateBlock

Creates a new state block that contains the values for all device states, vertex-related states, or pixel-related states.

CreateTexture

Creates a texture resource.

CreateVertexBuffer

Creates a vertex buffer.

CreateVertexDeclaration

Create a vertex shader declaration from the device and the vertex elements.

CreateVertexShader

Creates a vertex shader.

CreateVolumeTexture

Creates a volume texture resource.

DeletePatch

Frees a cached high-order patch.

DrawIndexedPrimitive

Based on indexing, renders the specified geometric primitive into an array of vertices.

DrawIndexedPrimitiveUP

Renders the specified geometric primitive with data specified by a user memory pointer.

DrawPrimitive

Renders a sequence of nonindexed, geometric primitives of the specified type from the current set of data input streams.

DrawPrimitiveUP

Renders data specified by a user memory pointer as a sequence of geometric primitives of the specified type.

DrawRectPatch

Draws a rectangular patch using the currently set streams.

DrawTriPatch

Draws a triangular patch using the currently set streams.

EndScene

Ends a scene that was begun by calling IDirect3DDevice9::BeginScene.

EndStateBlock

Signals Direct3D to stop recording a device-state block and retrieve a pointer to the state block interface.

EvictManagedResources

Evicts all managed resources, including both Direct3D and driver-managed resources.

GetAvailableTextureMem

Returns an estimate of the amount of available texture memory.

GetBackBuffer

Retrieves a back buffer from the device's swap chain.

GetClipPlane

Retrieves the coefficients of a user-defined clipping plane for the device.

GetClipStatus

Retrieves the clip status.

GetCreationParameters

Retrieves the creation parameters of the device.

GetCurrentTexturePalette

Retrieves the current texture palette.

GetDepthStencilSurface

Gets the depth-stencil surface owned by the Direct3DDevice object.

GetDeviceCaps

Retrieves the capabilities of the rendering device.

GetDirect3D

Returns an interface to the instance of the Direct3D object that created the device.

GetDisplayMode

Retrieves the display mode's spatial resolution, color resolution, and refresh frequency.

GetFrontBufferData

Generates a copy of the device's front buffer and places that copy in a system memory buffer provided by the application.

GetFVF

Gets the fixed vertex function declaration.

GetGammaRamp

Retrieves the gamma correction ramp for the swap chain.

GetIndices

Retrieves index data.

GetLight

Retrieves a set of lighting properties that this device uses.

GetLightEnable

Retrieves the activity status - enabled or disabled - for a set of lighting parameters within a device.

GetMaterial

Retrieves the current material properties for the device.

GetNPatchMode

Gets the N-patch mode segments.

GetNumberOfSwapChains

Gets the number of implicit swap chains.

GetPaletteEntries

Retrieves palette entries.

GetPixelShader

Retrieves the currently set pixel shader.

GetPixelShaderConstantB

Gets a Boolean shader constant.

GetPixelShaderConstantF

Gets a floating-point shader constant.

GetPixelShaderConstantI

Gets an integer shader constant.

GetRasterStatus

Returns information describing the raster of the monitor on which the swap chain is presented.

GetRenderState

Retrieves a render-state value for a device.

GetRenderTarget

Retrieves a render-target surface.

GetRenderTargetData

Copies the render-target data from device memory to system memory.

GetSamplerState

Gets the sampler state value.

GetScissorRect

Gets the scissor rectangle.

GetSoftwareVertexProcessing

Gets the vertex processing (hardware or software) mode.

GetStreamSource

Retrieves a vertex buffer bound to the specified data stream.

GetStreamSourceFreq

Gets the stream source frequency divider value.

GetSwapChain

Gets a pointer to a swap chain.

GetTexture

Retrieves a texture assigned to a stage for a device.

GetTextureStageState

Retrieves a state value for an assigned texture.

GetTransform

Retrieves a matrix describing a transformation state.

GetVertexDeclaration

Gets a vertex shader declaration.

GetVertexShader

Retrieves the currently set vertex shader.

GetVertexShaderConstantB

Gets a Boolean vertex shader constant.

GetVertexShaderConstantF

Gets a floating-point vertex shader constant.

GetVertexShaderConstantI

Gets an integer vertex shader constant.

GetViewport

Retrieves the viewport parameters currently set for the device.

LightEnable

Enables or disables a set of lighting parameters within a device.

MultiplyTransform

Multiplies a device's world, view, or projection matrices by a specified matrix.

Present

Presents the contents of the next buffer in the sequence of back buffers owned by the device.

ProcessVertices

Applies the vertex processing defined by the vertex shader to the set of input data streams, generating a single stream of interleaved vertex data to the destination vertex buffer.

Reset

Resets the type, size, and format of the swap chain.

SetClipPlane

Sets the coefficients of a user-defined clipping plane for the device.

SetClipStatus

Sets the clip status.

SetCurrentTexturePalette

Sets the current texture palette.

SetCursorPosition

Sets the cursor position and update options.

SetCursorProperties

Sets properties for the cursor.

SetDepthStencilSurface

Sets the depth stencil surface.

SetDialogBoxMode

This method allows the use of GDI dialog boxes in full-screen mode applications.

SetFVF

Sets the current vertex stream declaration.

SetGammaRamp

Sets the gamma correction ramp for the implicit swap chain. This method will affect the entire screen (not just the active window if you are running in windowed mode).

SetIndices

Sets index data.

SetLight

Assigns a set of lighting properties for this device.

SetMaterial

Sets the material properties for the device.

SetNPatchMode

Enable or disable N-patches.

SetPaletteEntries

Sets palette entries.

SetPixelShader

Sets the current pixel shader to a previously created pixel shader.

SetPixelShaderConstantB

Sets a Boolean shader constant.

SetPixelShaderConstantF

Sets a floating-point shader constant.

SetPixelShaderConstantI

Sets an integer shader constant.

SetRenderState

Sets a single device render-state parameter.

SetRenderTarget

Sets a new color buffer for the device.

SetSamplerState

Sets the sampler state value.

SetScissorRect

Sets the scissor rectangle.

SetSoftwareVertexProcessing

Use this method to switch between software and hardware vertex processing.

SetStreamSource

Binds a vertex buffer to a device data stream. For more information, see Setting the Stream Source (Direct3D 9).

SetStreamSourceFreq

Sets the stream source frequency divider value. This may be used to draw several instances of geometry.

SetTexture

Assigns a texture to a stage for a device.

SetTextureStageState

Sets the state value for the currently assigned texture.

SetTransform

Sets a single device transformation-related state.

SetVertexDeclaration

Sets a Vertex Declaration (Direct3D 9).

SetVertexShader

Sets the vertex shader.

SetVertexShaderConstantB

Sets a Boolean vertex shader constant.

SetVertexShaderConstantF

Sets a floating-point vertex shader constant.

SetVertexShaderConstantI

Sets an integer vertex shader constant.

SetViewport

Sets the viewport parameters for the device.

ShowCursor

Displays or hides the cursor.

StretchRect

Copy the contents of the source rectangle to the destination rectangle. The source rectangle can be stretched and filtered by the copy. This function is often used to change the aspect ratio of a video stream.

TestCooperativeLevel

Reports the current cooperative-level status of the Direct3D device for a windowed or full-screen application.

UpdateSurface

Copies rectangular subsets of pixels from one surface to another.

UpdateTexture

Updates the dirty portions of a texture.

ValidateDevice

Reports the device's ability to render the current texture-blending operations and arguments in a single 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

Header

D3D9.h

Library

D3d9.lib

See also

IDirect3D9::CreateDevice

 

 

Community Additions

ADD
Show:
© 2014 Microsoft