UnloadFromGPU

Advanced function

void UnloadFromGPU();

Unloads the texture and geometry information of the from the graphics card.

You don't usually need to call this function as OpenLayer automatically calls this function when you a TextRenderer is destroyed (the destructor or the Destroy() -method is called). However, if you wish to have more control of when the font resides in the GPU you can use this function.

Note that the TextRenderer will be invalidated if you call this function but all the resources of the font are not unloaded.

Examples

TextRenderer renderer( ... );

// Unloads the font information from the graphics card. //
renderer.UnloadFromGPU();


Other functions of the class TextRenderer
Load
Load the font
Print
Prints the given text to the screen
SetColor
Sets the color of the font
GetColor
Returns the text color of the font
SetItalics
Sets the italics angle of the text
GetItalics
Returns the italics angle of the text
Width
Returns the width of the given text
Height
Returns the height of the given text
FirstLineWidth
Returns the width of the first text line of the given text
FirstLineHeight
Returns the height of the first text line of the given text
IsValid
Checks if the TextRenderer was loaded correctly

Advanced functions

GetFace
SendToGPU
UnloadFromGPU
UseAutoDelete


Questions about UnloadFromGPU? Click here.