source: trunk/src/lib/freetype2.cc @ 198

Last change on this file since 198 was 167, checked in by epyon, 12 years ago
  • freetype2 - using new function loading method
  • gl - using new function loading method
File size: 845 bytes
Line 
1// Copyright (C) 2012-2013 ChaosForge / Kornel Kisielewicz
2// http://chaosforge.org/
3//
4// This file is part of NV Libraries.
5// For conditions of distribution and use, see copyright notice in nv.hh
6
7#include "nv/lib/freetype2.hh"
8
9#if defined( NV_FREETYPE_DYNAMIC )
10
11#include "nv/library.hh"
12
13#define NV_FREETYPE_FUN( rtype, fname, fparams ) rtype (*fname) fparams = nullptr;
14#include <nv/lib/detail/freetype2_functions.inc>
15#undef NV_FREETYPE_FUN
16
17bool nv::load_freetype_library( const char* path )
18{
19        static nv::library freetype_library;
20        if ( freetype_library.is_open() ) return true;
21        freetype_library.open( path );
22
23#       define NV_FREETYPE_FUN( rtype, fname, fparams ) *(void **) (&fname) = freetype_library.get(#fname);
24#       include <nv/lib/detail/freetype2_functions.inc>
25#       undef NV_FREETYPE_FUN
26        return true;
27}
28#endif
Note: See TracBrowser for help on using the repository browser.