Creates a mesh containing the specified text, using the font associated with the device context.
HRESULT D3DXCreateText( _In_ LPDIRECT3DDEVICE9 pDevice, _In_ HDC hDC, _In_ LPCTSTR pText, _In_ FLOAT Deviation, _In_ FLOAT Extrusion, _Out_ LPD3DXMESH *ppMesh, _Out_ LPD3DXBUFFER *ppAdjacency, _Out_ LPGLYPHMETRICSFLOAT pGlyphMetrics );
- pDevice [in]
Pointer to the device that created the mesh.
- hDC [in]
Device context, containing the font for output. The font selected by the device context must be a TrueType font.
- pText [in]
Pointer to a string that specifies the text to generate. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.
- Deviation [in]
Maximum chordal deviation from TrueType font outlines.
- Extrusion [in]
Amount to extrude text in the negative z-direction.
- ppMesh [out]
Pointer to the returned mesh.
- ppAdjacency [out]
Pointer to a buffer containing adjacency information. May be NULL.
- pGlyphMetrics [out]
Pointer to an array of GLYPHMETRICSFLOAT structures that contain the glyph metric data. Each element contains information about the position and orientation of the corresponding glyph in the string. The number of elements in the array should be equal to the number of characters in the string. Note that the origin in each structure is not relative to the entire string, but rather is relative to that character cell. To compute the entire bounding box, add the increment for each glyph while traversing the string. If you are not concerned with the glyph sizes, set this parameter to NULL.
If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA, E_OUTOFMEMORY.
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to D3DXCreateTextW. Otherwise, the function call resolves to D3DXCreateTextA because ANSI strings are being used.
This function creates a mesh with the D3DXMESH_MANAGED creation option and D3DFVF_XYZ | D3DFVF_NORMAL flexible vertex format (FVF).