Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

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 #ifdef WIN32
00009 
00010     // Under windows avoid including <windows.h> is overrated. 
00011     // Sure, it can be avoided and "name space pollution" can be
00012     // avoided, but why? It really doesn't make that much difference
00013     // these days.
00014     #define  WIN32_LEAN_AND_MEAN
00015     #include <windows.h>
00016 
00017     #ifndef __gl_h_
00018         #include <GL/gl.h>
00019         #include <GL/glu.h>
00020     #endif
00021 
00022 #else
00023 
00024     // Non windows platforms - don't require nonsense as seen above :-)    
00025     #ifndef __gl_h_
00026         #ifdef __APPLE_CC__
00027             #include <OpenGL/gl.h>
00028             #include <OpenGL/glu.h>
00029         #else
00030             #include <GL/gl.h>
00031             #include <GL/glu.h>
00032         #endif                
00033 
00034     #endif
00035 
00036     // Required for compatibility with glext.h style function definitions of 
00037     // OpenGL extensions, such as in src/osg/Point.cpp.
00038     #ifndef APIENTRY
00039         #define APIENTRY
00040     #endif
00041 #endif
00042 
00043 // Compiler-specific conditional compilation
00044 #ifdef _MSC_VER // MS Visual C++ 
00045 
00046     // Disable various warning.
00047     // 4786: template name too long
00048     #pragma warning( disable : 4251 )
00049     #pragma warning( disable : 4275 )
00050     #pragma warning( disable : 4786 )
00051 
00052     // The following definitions control how symbols are exported.
00053     // If the target is a static library ensure that FTGL_LIBRARY_STATIC
00054     // is defined. If building a dynamic library (ie DLL) ensure the
00055     // FTGL_LIBRARY macro is defined, as it will mark symbols for 
00056     // export. If compiling a project to _use_ the _dynamic_ library 
00057     // version of the library, no definition is required. 
00058     #ifdef FTGL_LIBRARY_STATIC      // static lib - no special export required
00059     #  define FTGL_EXPORT
00060     #elif FTGL_LIBRARY              // dynamic lib - must export/import symbols appropriately.
00061     #  define FTGL_EXPORT   __declspec(dllexport)
00062     #else
00063     #  define FTGL_EXPORT   __declspec(dllimport)
00064     #endif 
00065 
00066 #else
00067     // Compiler that is not MS Visual C++.
00068     // Ensure that the export symbol is defined (and blank)
00069     #define FTGL_EXPORT
00070 #endif  
00071 
00072 
00073 // lifted from glext.h, to remove dependancy on glext.h
00074 #ifndef GL_EXT_texture_object
00075     #define GL_TEXTURE_PRIORITY_EXT           0x8066
00076     #define GL_TEXTURE_RESIDENT_EXT           0x8067
00077     #define GL_TEXTURE_1D_BINDING_EXT         0x8068
00078     #define GL_TEXTURE_2D_BINDING_EXT         0x8069
00079     #define GL_TEXTURE_3D_BINDING_EXT         0x806A
00080 #endif
00081 
00082 #endif  //  __FTGL__

Generated on Mon Aug 25 15:16:37 2003 for FTGL by doxygen 1.3.3