Back to index

extremetuxracer  0.5beta
FTGL.h
Go to the documentation of this file.
00001 #ifndef     __FTGL__
00002 #define     __FTGL__
00003 
00004 
00005 typedef double   FTGL_DOUBLE;
00006 typedef float    FTGL_FLOAT;
00007 
00008 // Fixes for deprecated identifiers in 2.1.5
00009 #ifndef FT_OPEN_MEMORY
00010     #define FT_OPEN_MEMORY (FT_Open_Flags)1
00011 #endif
00012 
00013 #ifndef FT_RENDER_MODE_MONO
00014     #define FT_RENDER_MODE_MONO ft_render_mode_mono
00015 #endif
00016 
00017 #ifndef FT_RENDER_MODE_NORMAL
00018     #define FT_RENDER_MODE_NORMAL ft_render_mode_normal
00019 #endif
00020 
00021   
00022 #ifdef WIN32
00023 
00024     // Under windows avoid including <windows.h> is overrated. 
00025     // Sure, it can be avoided and "name space pollution" can be
00026     // avoided, but why? It really doesn't make that much difference
00027     // these days.
00028     #define  WIN32_LEAN_AND_MEAN
00029     #include <windows.h>
00030 
00031     #ifndef __gl_h_
00032         #include <GL/gl.h>
00033         #include <GL/glu.h>
00034     #endif
00035 
00036 #else
00037 
00038     // Non windows platforms - don't require nonsense as seen above :-)    
00039     #ifndef __gl_h_
00040         #ifdef __APPLE_CC__
00041             #include <OpenGL/gl.h>
00042             #include <OpenGL/glu.h>
00043         #else
00044             #include <GL/gl.h>
00045             #include <GL/glu.h>
00046         #endif                
00047 
00048     #endif
00049 
00050     // Required for compatibility with glext.h style function definitions of 
00051     // OpenGL extensions, such as in src/osg/Point.cpp.
00052     #ifndef APIENTRY
00053         #define APIENTRY
00054     #endif
00055 #endif
00056 
00057 // Compiler-specific conditional compilation
00058 #ifdef _MSC_VER // MS Visual C++ 
00059 
00060     // Disable various warning.
00061     // 4786: template name too long
00062     #pragma warning( disable : 4251 )
00063     #pragma warning( disable : 4275 )
00064     #pragma warning( disable : 4786 )
00065 
00066     // The following definitions control how symbols are exported.
00067     // If the target is a static library ensure that FTGL_LIBRARY_STATIC
00068     // is defined. If building a dynamic library (ie DLL) ensure the
00069     // FTGL_LIBRARY macro is defined, as it will mark symbols for 
00070     // export. If compiling a project to _use_ the _dynamic_ library 
00071     // version of the library, no definition is required. 
00072     #ifdef FTGL_LIBRARY_STATIC      // static lib - no special export required
00073     #  define FTGL_EXPORT
00074     #elif FTGL_LIBRARY              // dynamic lib - must export/import symbols appropriately.
00075     #  define FTGL_EXPORT   __declspec(dllexport)
00076     #else
00077     #  define FTGL_EXPORT   __declspec(dllimport)
00078     #endif 
00079 
00080 #else
00081     // Compiler that is not MS Visual C++.
00082     // Ensure that the export symbol is defined (and blank)
00083     #define FTGL_EXPORT
00084 #endif  
00085 
00086 #endif  //  __FTGL__