Partager via


D3DMX Functions (Windows Embedded CE 6.0)

1/6/2010

This section contains information about the functions used with Microsoft® Direct3D® Mobile Extensions. All these functions can take the same object as in and out parameters. Out parameters are typically returned as return values. This allows the output of one function to be used as a parameter to another.

The Direct3D Mobile extension functions can be broken into three categories: matrix and vector functions for floating point calculations, matrix and vector functions for fixed point calculations, and texture management functions. The floating and fixed point matrix and vector functions are identical to one another except for their numerical formats.

The following table shows the Direct3D Mobile extension functions for matrix operations.

Floating point function Fixed point function Description

D3DMXMatrixfDeterminant

D3DMXMatrixfDeterminantFxd

Returns the determinant of a matrix.

D3DMXMatrixIdentity

D3DMXMatrixIdentityFxd

An Inline function that returns the identity matrix.

D3DMXMatrixInverse

D3DMXMatrixInverseFxd

Returns the inverse of a matrix.

D3DMXMatrixLookAtLH

D3DMXMatrixLookAtLHFxd

Builds a left-handed, look-at matrix.

D3DMXMatrixMultiply

D3DMXMatrixMultiplyFxd

Determines the product of two matrices.

D3DMXMatrixOrthoOffCenterLH

D3DMXMatrixOrthoOffCenterLHFxd

Builds a customized, left-handed orthogonal projection matrix.

D3DMXMatrixPerspectiveFovLH

D3DMXMatrixPerspectiveFovLHFxd

Builds a left-handed perspective projection matrix based on a field of view.

D3DMXMatrixPerspectiveOffCenterLH

D3DMXMatrixPerspectiveOffCenterLHFxd

Builds a customized, left-handed perspective projection matrix.

D3DMXMatrixRotationAxis

D3DMXMatrixRotationAxisFxd

Builds a matrix that represents a rotation transformation around an arbitrary axis.

D3DMXMatrixRotationX

D3DMXMatrixRotationXFxd

Builds a matrix that represents a rotation transformation around an arbitrary axis.

D3DMXMatrixRotationY

D3DMXMatrixRotationYFxd

Builds a matrix that represents a rotation transformation around the y-axis.

D3DMXMatrixRotationYawPitchRoll

D3DMXMatrixRotationYawPitchRollFxd

Builds a matrix that represents a yaw, pitch, and roll transformation.

D3DMXMatrixRotationZ

D3DMXMatrixRotationZFxd

Builds a matrix that represents a rotation transformation around the z-axis.

D3DMXMatrixScaling

D3DMXMatrixScalingFxd

Builds a matrix that represents a scaling transformation along the x-axis, the y-axis, and the z-axis.

D3DMXMatrixTranslation

D3DMXMatrixTranslationFxd

Builds a matrix that represents a translation transformation by the offsets x, y, and z.

D3DMXMatrixTranspose

D3DMXMatrixTransposeFxd

Returns the transpose of a matrix in floating point format.

The following table shows the Direct3D Mobile extension functions for three-dimensional vectors.

Floating point function Fixed point function Description

D3DMXVec3Add

D3DMXVec3AddFxd

An inline function that adds two 3-D vectors together.

D3DMXVec3Cross

D3DMXVec3CrossFxd

An inline function that returns the cross product of two vectors.

D3DMXVec3Dot

D3DMXVec3DotFxd

An inline function that returns the dot product of two vectors.

D3DMXVec3Length

D3DMXVec3LengthFxd

An inline function that returns the length of a 3-D vector.

D3DMXVec3LengthSq

D3DMXVec3LengthSqFxd

An inline function that returns the square of the length of a 3-D vector.

D3DMXVec3Normalize

D3DMXVec3NormalizeFxd

Returns the normalized version of a vector.

D3DMXVec3Scale

D3DMXVec3ScaleFxd

An inline function that multiplies a vector by a scalar value.

D3DMXVec3Subtract

D3DMXVec3SubtractFxd

An inline function that subtracts two 3-D functions.

D3DMXVec3Transform

D3DMXVec3TransformFxd

Transforms the vector (x, y, z, 1) by a given matrix.

The following table shows the Direct3D Mobile extension functions for four-dimensional vectors.

Floating point function Fixed point function Description

D3DMXVec4Add

D3DMXVec4AddFxd

An inline function that adds two 4-D vectors together.

D3DMXVec4Cross

D3DMXVec4CrossFxd

Returns the cross product of two 4-D vectors.

D3DMXVec4Dot

D3DMXVec4DotFxd

An inline function that returns the dot product of two 4-D vectors.

D3DMXVec4Length

D3DMXVec4LengthFxd

An inline function that returns the length of a 4-D vector.

D3DMXVec4LengthSq

D3DMXVec4LengthSqFxd

An inline function that returns the square of the length of a 4-D vector in floating point format.

D3DMXVec4Normalize

D3DMXVec4NormalizeFxd

Returns the normalized version of a given vector.

D3DMXVec4Scale

D3DMXVec4ScaleFxd

An inline function that multiplies a vector by a scalar.

D3DMXVec4Subtract

D3DMXVec4SubtractFxd

An inline function that subtracts two 4-D vectors.

D3DMXVec4Transform

D3DMXVec4TransformFxd

Transforms a 4-D vector by a given matrix.

The following table shows the Direct3D Mobile extension functions for texture operations.

Function Description

D3DMXCheckTextureRequirements

Checks texture creation parameters and corrects invalid parameters.

D3DMXCreateTexture

Creates an empty texture.

D3DMXCreateTextureFromFileEx

Creates a texture object from a file.

D3DMXCreateTextureFromResourceEx

Creates a texture object from a resource.

D3DMXLoadSurfaceFromFile

Loads a surface from a file.

D3DMXLoadSurfaceFromFileInMemory

Loads a surface from memory.

D3DMXLoadSurfaceFromResource

Loads a surface from a resource.

D3DMXLoadSurfaceFromSurface

Loads a surface from another surface, with color conversion.

See Also

Reference

Direct3D Mobile Extensions Reference