ID3DX10Font::PreloadGlyphs method
Load a series of glyphs into video memory to improve the efficiency of rendering to the device.
Syntax
HRESULT PreloadGlyphs(
[in] UINT First,
[in] UINT Last
);
Parameters
-
First [in]
-
Type: UINT
ID of the first glyph to be loaded into video memory.
-
Last [in]
-
Type: UINT
ID of the last glyph to be loaded into video memory.
Return value
Type: HRESULT
If the method succeeds, the return value is S_OK. If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA.
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; ID3DX10Font::DrawText must still be called to render the glyphs. However, by pre-loading glyphs into video memory, ID3DX10Font::DrawText will use substantially fewer CPU resources.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|
See also