1 #ifndef    __FTGL__
2 #define    __FTGL__
3 
4 //#if defined(VTKFTGL)
5 #include "vtkftglConfig.h"
6 //#endif
7 
8 #define FTGL_USE_NAMESPACE
9 
10 // To include debug memory manager by Paul Nettle (midnight@FluidStudios.com)
11 // http://www.FluidStudios.com/publications.html
12 // Get this code and use it. It will open your eyes:)
13 // #define FTGL_DEBUG
14 
15 typedef double   FTGL_DOUBLE;
16 typedef float    FTGL_FLOAT;
17 
18 typedef void (*FTCallback)();
19 
20 struct FTGLRenderContext
21 {
22 #ifdef FTGL_SUPPORT_MANGLE_MESA
23   int UseMangleMesa;
24 #endif
25 };
26 
27 #ifdef WIN32
28 
29     // Under windows avoid including <windows.h> is overrated.
30   // Sure, it can be avoided and "name space pollution" can be
31   // avoided, but why? It really doesn't make that much difference
32   // these days.
33     #define  WIN32_LEAN_AND_MEAN
34     #include <windows.h>
35 
36 #endif
37 
38 // Compiler-specific conditional compilation
39 #ifdef _MSC_VER // MS Visual C++
40 
41   // Disable various warning.
42   // 4786: template name too long
43   #pragma warning( disable : 4251 )
44   #pragma warning( disable : 4275 )
45   #pragma warning( disable : 4786 )
46 
47   // Disable the usual'function ... not inlined' triggered by /W4
48   #pragma warning( disable : 4710 )
49 
50 #if ( _MSC_VER >= 1300 ) // Visual studio .NET
51 
52 #pragma warning( disable : 4244 ) // conversion [...] possible loss of data
53 #pragma warning( disable : 4267 ) // same
54 #pragma warning( disable : 4311 ) // same for pointer
55 #pragma warning( disable : 4312 ) // same for pointer
56 
57 #endif /* _MSC_VER */
58 
59 #endif
60 
61 
62 #if defined(__BORLANDC__)
63 #pragma warn -8027 /* "functions containing for are not expanded inline" */
64 #endif
65 
66 
67 #ifdef WIN32
68 
69   // The following definitions control how symbols are exported.
70   // If the target is a static library ensure that FTGL_LIBRARY_STATIC
71   // is defined. If building a dynamic library (ie DLL) ensure the
72   // FTGL_LIBRARY macro is defined, as it will mark symbols for
73   // export. If compiling a project to _use_ the _dynamic_ library
74   // version of the library, no definition is required.
75   #ifdef FTGL_LIBRARY_STATIC    // static lib - no special export required
76   #  define FTGL_EXPORT
77   #else
78     #ifdef vtkftgl_EXPORTS        // dynamic lib - must export/import symbols appropriately.
79   #  define FTGL_EXPORT   __declspec(dllexport)
80   #else
81   #  define FTGL_EXPORT   __declspec(dllimport)
82   #endif
83   #endif
84 
85 #else
86   // Compiler that is not MS Visual C++.
87   // Ensure that the export symbol is defined (and blank)
88   #define FTGL_EXPORT
89 #endif
90 
91 #endif  //  __FTGL__
92