00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00029
00032
00033 #ifndef __H3DApi_H__
00034 #define __H3DApi_H__
00035
00038 #define HAVE_OPENHAPTICS
00039
00042 #define USE_HAPTICS
00043
00046 #define HAVE_OPENAL
00047
00050 #define HAVE_LIBVORBIS
00051
00054 #define HAVE_LIBAUDIOFILE
00055
00059 #define HAVE_CG
00060
00063 #define HAVE_FTGL
00064
00067 #define HAVE_FREETYPE
00068
00071 #ifdef WIN32
00072 #define HAVE_3DXWARE
00073 #endif
00074
00077 #define HAVE_PYTHON
00078
00081 #define HAVE_FREEIMAGE
00082
00086 #define HAVE_LIBCURL
00087
00090 #ifdef WIN32
00091 #define HAVE_DSHOW
00092 #endif
00093
00097 #define HAVE_DHDAPI
00098
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111 #ifdef WIN32
00112 #include <windows.h>
00113 #ifdef H3DAPI_EXPORTS
00114 #define H3DAPI_API __declspec(dllexport)
00115 #else
00116 #define H3DAPI_API __declspec(dllimport)
00117 #endif
00118 #ifdef _MSC_VER
00119
00120 #pragma warning( disable: 4251 )
00121 #endif
00122
00123
00124 #endif
00125
00126 #if defined(__APPLE__) && defined(__MACH__)
00127 #define MACOSX
00128 #define H3DAPI_API
00129 #define HAVE_SYS_TIME_H
00130 #endif
00131
00132 #if defined(__linux)
00133 #define LINUX
00134 #define H3DAPI_API
00135 #define HAVE_SYS_TIME_H
00136 #endif
00137
00138
00139 namespace H3D {
00142 inline bool isLittleEndian() {
00143 union probe{
00144 unsigned int num;
00145 unsigned char bytes[sizeof(unsigned int)];
00146 };
00147
00148 probe p = { 1U };
00149
00150 bool little_endian = (p.bytes[0] == 1U);
00151 return little_endian;
00152 }
00153 }
00154
00155 #endif
00156
00157
00158