# 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

Returns the determinant of a matrix.

An Inline function that returns the identity matrix.

Returns the inverse of a matrix.

Builds a left-handed, look-at matrix.

Determines the product of two matrices.

Builds a customized, left-handed orthogonal projection matrix.

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

Builds a customized, left-handed perspective projection matrix.

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

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

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

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

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

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

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

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

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

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

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

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

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

Returns the normalized version of a vector.

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

An inline function that subtracts two 3-D functions.

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

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

Returns the cross product of two 4-D vectors.

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

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

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

Returns the normalized version of a given vector.

An inline function that multiplies a vector by a scalar.

An inline function that subtracts two 4-D vectors.

Transforms a 4-D vector by a given matrix.

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

Function Description

Checks texture creation parameters and corrects invalid parameters.

Creates an empty texture.

Creates a texture object from a file.

Creates a texture object from a resource.

Loads a surface from a file.

Loads a surface from a resource.

Loads a surface from another surface, with color conversion.