mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-14 10:30:08 +00:00
initial commit. This is icculus version 5542b94cae02a6333845854bbbd1abe0a259f1a4
This commit is contained in:
commit
3096eaf5e2
2519 changed files with 816064 additions and 0 deletions
65
ExternalLibs/FTGL/src/FTLibrary.cpp
Normal file
65
ExternalLibs/FTGL/src/FTLibrary.cpp
Normal file
|
@ -0,0 +1,65 @@
|
|||
#include "FTLibrary.h"
|
||||
|
||||
|
||||
const FTLibrary& FTLibrary::Instance()
|
||||
{
|
||||
static FTLibrary ftlib;
|
||||
return ftlib;
|
||||
}
|
||||
|
||||
|
||||
FTLibrary::~FTLibrary()
|
||||
{
|
||||
if( library != 0)
|
||||
{
|
||||
FT_Done_FreeType( *library);
|
||||
|
||||
delete library;
|
||||
library= 0;
|
||||
}
|
||||
|
||||
// if( manager != 0)
|
||||
// {
|
||||
// FTC_Manager_Done( manager );
|
||||
//
|
||||
// delete manager;
|
||||
// manager= 0;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
FTLibrary::FTLibrary()
|
||||
: library(0),
|
||||
err(0)
|
||||
{
|
||||
Initialise();
|
||||
}
|
||||
|
||||
|
||||
bool FTLibrary::Initialise()
|
||||
{
|
||||
if( library != 0)
|
||||
return true;
|
||||
|
||||
library = new FT_Library;
|
||||
|
||||
err = FT_Init_FreeType( library);
|
||||
if( err)
|
||||
{
|
||||
delete library;
|
||||
library = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
// FTC_Manager* manager;
|
||||
//
|
||||
// if( FTC_Manager_New( lib, 0, 0, 0, my_face_requester, 0, manager )
|
||||
// {
|
||||
// delete manager;
|
||||
// manager= 0;
|
||||
// return false;
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue