d3d9.dllPreloadGlyphs
Microsoft DirectX 9.0 SDK Update (October 2004)

ID3DXFont::PreloadGlyphs Method


Loads a series of glyphs into video memory to improve the efficiency of rendering to the device.

Syntax

HRESULT PreloadGlyphs(      

    UINT First,     UINT Last );

Parameters

First
[in] Identifier (ID) of the first glyph to be loaded into video memory.
Last
[in] ID of the last glyph to be loaded into video memory.

Return Value

If the method succeeds, the return value is S_OK.

If the method fails, the return value can be one of the following:

D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
D3DXERR_INVALIDDATAThe data is invalid.


Remarks

This method generates textures that contain the input glyphs. The glyphs are drawn as a series of triangles.

Glyphs will not be rendered to the device; ID3DXFont::DrawText must still be called to render the glyphs. However, by pre-loading glyphs into video memory, ID3DXFont::DrawText will use substantially fewer CPU resources.



© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.