FTLibrary.h
Go to the documentation of this file.
/*
* FTGL - OpenGL font library
*
* Copyright (c) 2001-2004 Henry Maddocks <ftgl@opengl.geek.nz>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef __FTLibrary__
#define __FTLibrary__
#ifdef __cplusplus
#include <ft2build.h>
#include FT_FREETYPE_H
//#include FT_CACHE_H
#include "FTGL/ftgl.h"
#include <atomic>
class FTLibrary
{
public:
static FTLibrary& Instance();
const FT_Library* GetLibrary() const { return library; }
FT_Error Error() const { return err; }
~FTLibrary();
void LegacyOpenGLState(bool On);
bool GetLegacyOpenGLStateSet() const { return LegacyOpenGLStateHandling; }
private:
FTLibrary();
FTLibrary(const FT_Library&){}
FTLibrary& operator=(const FT_Library&) { return *this; }
bool Initialise();
FT_Library* library;
// FTC_Manager* manager;
FT_Error err;
std::atomic <int> LegacyOpenGLStateHandling;
};
#endif //__cplusplus
#endif // __FTLibrary__
FTLibrary
FTLibrary class is the global accessor for the Freetype library.
Definition FTLibrary.h:57
FTLibrary::Instance
static FTLibrary & Instance()
Global acces point to the single FTLibrary object.
FTLibrary::LegacyOpenGLState
void LegacyOpenGLState(bool On)
See README-LegacyOpenGLState.
FTLibrary::Error
FT_Error Error() const
Queries the library for errors.
Definition FTLibrary.h:78
FTLibrary::~FTLibrary
~FTLibrary()
Destructor.
FTLibrary::GetLegacyOpenGLStateSet
bool GetLegacyOpenGLStateSet() const
Definition FTLibrary.h:97
FTLibrary::GetLibrary
const FT_Library * GetLibrary() const
Gets a pointer to the native Freetype library.
Definition FTLibrary.h:71
ftgl.h