FTGL 2.4.0
Public Member Functions | Static Public Member Functions
FTLibrary Class Reference

FTLibrary class is the global accessor for the Freetype library. More...

#include <FTLibrary.h>

Public Member Functions

const FT_Library * GetLibrary () const
 Gets a pointer to the native Freetype library.
 
FT_Error Error () const
 Queries the library for errors.
 
 ~FTLibrary ()
 Destructor.
 
void LegacyOpenGLState (bool On)
 See README-LegacyOpenGLState.
 
bool GetLegacyOpenGLStateSet () const
 

Static Public Member Functions

static FTLibraryInstance ()
 Global acces point to the single FTLibrary object.
 

Detailed Description

FTLibrary class is the global accessor for the Freetype library.

This class encapsulates the Freetype Library. This is a singleton class and ensures that only one FT_Library is in existence at any one time. All constructors are private therefore clients cannot create or instantiate this class themselves and must access it's methods via the static FTLibrary::Instance() function.

Just because this class returns a valid FTLibrary object doesn't mean that the Freetype Library has been successfully initialised. Clients should check for errors. You can initialise the library AND check for errors using the following code... err = FTLibrary::Instance().Error();

See also
"Freetype 2 Documentation"

Definition at line 56 of file FTLibrary.h.

Constructor & Destructor Documentation

◆ ~FTLibrary()

FTLibrary::~FTLibrary ( )

Destructor.

Disposes of the Freetype library

Member Function Documentation

◆ Error()

FT_Error FTLibrary::Error ( ) const
inline

Queries the library for errors.

Returns
The current error code.

Definition at line 78 of file FTLibrary.h.

◆ GetLegacyOpenGLStateSet()

bool FTLibrary::GetLegacyOpenGLStateSet ( ) const
inline

Definition at line 97 of file FTLibrary.h.

◆ GetLibrary()

const FT_Library * FTLibrary::GetLibrary ( ) const
inline

Gets a pointer to the native Freetype library.

Returns
A handle to a FreeType library instance.

Definition at line 71 of file FTLibrary.h.

◆ Instance()

static FTLibrary & FTLibrary::Instance ( )
static

Global acces point to the single FTLibrary object.

Returns
The global FTLibrary object.

◆ LegacyOpenGLState()

void FTLibrary::LegacyOpenGLState ( bool  On)

See README-LegacyOpenGLState.

Choose incompatible legacy behaviour, see commit 29603ae3fa88c5b9e079a6db23be2cdea95aef39.

May only be set to the same value (but any number of times) within one program.


The documentation for this class was generated from the following file: