Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenglheader.h
Go to the documentation of this file.
00001 00021 /* 00022 * Mesa 3-D graphics library 00023 * Version: 6.5 00024 * 00025 * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. 00026 * 00027 * Permission is hereby granted, free of charge, to any person obtaining a 00028 * copy of this software and associated documentation files (the "Software"), 00029 * to deal in the Software without restriction, including without limitation 00030 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00031 * and/or sell copies of the Software, and to permit persons to whom the 00032 * Software is furnished to do so, subject to the following conditions: 00033 * 00034 * The above copyright notice and this permission notice shall be included 00035 * in all copies or substantial portions of the Software. 00036 * 00037 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00038 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00039 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00040 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 00041 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00042 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00043 */ 00044 00045 00046 #ifndef GLHEADER_H 00047 #define GLHEADER_H 00048 00049 #include <assert.h> 00050 #include <ctype.h> 00051 #if defined(__alpha__) && defined(CCPML) 00052 #include <cpml.h> /* use Compaq's Fast Math Library on Alpha */ 00053 #else 00054 #include <math.h> 00055 #endif 00056 #include <limits.h> 00057 #include <stdlib.h> 00058 #include <stdio.h> 00059 #include <string.h> 00060 #if defined(__linux__) && defined(__i386__) 00061 #include <fpu_control.h> 00062 #endif 00063 #include <float.h> 00064 #include <stdarg.h> 00065 00066 00067 /* Get typedefs for uintptr_t and friends */ 00068 #if defined(__MINGW32__) || defined(__NetBSD__) 00069 # include <stdint.h> 00070 #elif defined(_WIN32) 00071 # include <BaseTsd.h> 00072 # if _MSC_VER == 1200 00073 typedef UINT_PTR uintptr_t; 00074 # endif 00075 #elif defined(__INTERIX) 00076 /* Interix 3.x has a gcc that shadows this. */ 00077 # ifndef _UINTPTR_T_DEFINED 00078 typedef unsigned long uintptr_t; 00079 # define _UINTPTR_T_DEFINED 00080 # endif 00081 #else 00082 # include <inttypes.h> 00083 #endif 00084 00085 00086 /* Sun compilers define __i386 instead of the gcc-style __i386__ */ 00087 #ifdef __SUNPRO_C 00088 # if !defined(__i386__) && defined(__i386) 00089 # define __i386__ 00090 # elif !defined(__amd64__) && defined(__amd64) 00091 # define __amd64__ 00092 # elif !defined(__sparc__) && defined(__sparc) 00093 # define __sparc__ 00094 # endif 00095 # if !defined(__volatile) 00096 # define __volatile volatile 00097 # endif 00098 #endif 00099 00100 #if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP) 00101 # define __WIN32__ 00102 # define finite _finite 00103 #endif 00104 00105 #if defined(__WATCOMC__) 00106 # define finite _finite 00107 # pragma disable_message(201) /* Disable unreachable code warnings */ 00108 #endif 00109 00110 #ifdef WGLAPI 00111 # undef WGLAPI 00112 #endif 00113 00114 #if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP) 00115 # if !defined(__GNUC__) /* mingw environment */ 00116 # pragma warning( disable : 4068 ) /* unknown pragma */ 00117 # pragma warning( disable : 4710 ) /* function 'foo' not inlined */ 00118 # pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */ 00119 # pragma warning( disable : 4127 ) /* conditional expression is constant */ 00120 # if defined(MESA_MINWARN) 00121 # pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */ 00122 # pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */ 00123 # pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */ 00124 # pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */ 00125 # pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */ 00126 # endif 00127 # endif 00128 # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ 00129 # define WGLAPI __declspec(dllexport) 00130 # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ 00131 # define WGLAPI __declspec(dllimport) 00132 # else /* for use with static link lib build of Win32 edition only */ 00133 # define WGLAPI __declspec(dllimport) 00134 # endif /* _STATIC_MESA support */ 00135 #endif /* WIN32 / CYGWIN bracket */ 00136 00137 00138 /* 00139 * Either define MESA_BIG_ENDIAN or MESA_LITTLE_ENDIAN. 00140 * Do not use them unless absolutely necessary! 00141 * Try to use a runtime test instead. 00142 * For now, only used by some DRI hardware drivers for color/texel packing. 00143 */ 00144 #if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN 00145 #if defined(__linux__) 00146 #include <byteswap.h> 00147 #define CPU_TO_LE32( x ) bswap_32( x ) 00148 #else /*__linux__*/ 00149 #include <sys/endian.h> 00150 #define CPU_TO_LE32( x ) bswap32( x ) 00151 #endif /*__linux__*/ 00152 #define MESA_BIG_ENDIAN 1 00153 #else 00154 #define CPU_TO_LE32( x ) ( x ) 00155 #define MESA_LITTLE_ENDIAN 1 00156 #endif 00157 #define LE32_TO_CPU( x ) CPU_TO_LE32( x ) 00158 00159 00160 #define GL_GLEXT_PROTOTYPES 00161 #include "GL/gl.h" 00162 #include "GL/glext.h" 00163 00164 00165 #ifndef GL_FIXED 00166 #define GL_FIXED 0x140C 00167 #endif 00168 00169 00170 #ifndef GL_OES_point_size_array 00171 #define GL_POINT_SIZE_ARRAY_OES 0x8B9C 00172 #define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A 00173 #define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B 00174 #define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C 00175 #define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F 00176 #endif 00177 00178 00179 #ifndef GL_OES_draw_texture 00180 #define GL_TEXTURE_CROP_RECT_OES 0x8B9D 00181 #endif 00182 00183 00184 #if !defined(CAPI) && defined(WIN32) && !defined(BUILD_FOR_SNAP) 00185 #define CAPI _cdecl 00186 #endif 00187 00188 00189 /* This is a macro on IRIX */ 00190 #ifdef _P 00191 #undef _P 00192 #endif 00193 00194 00195 /* Turn off macro checking systems used by other libraries */ 00196 #ifdef CHECK 00197 #undef CHECK 00198 #endif 00199 00200 00201 /* Create a macro so that asm functions can be linked into compilers other 00202 * than GNU C 00203 */ 00204 #ifndef _ASMAPI 00205 #if defined(WIN32) && !defined(BUILD_FOR_SNAP)/* was: !defined( __GNUC__ ) && !defined( VMS ) && !defined( __INTEL_COMPILER )*/ 00206 #define _ASMAPI __cdecl 00207 #else 00208 #define _ASMAPI 00209 #endif 00210 #ifdef PTR_DECL_IN_FRONT 00211 #define _ASMAPIP * _ASMAPI 00212 #else 00213 #define _ASMAPIP _ASMAPI * 00214 #endif 00215 #endif 00216 00217 #ifdef USE_X86_ASM 00218 #define _NORMAPI _ASMAPI 00219 #define _NORMAPIP _ASMAPIP 00220 #else 00221 #define _NORMAPI 00222 #define _NORMAPIP * 00223 #endif 00224 00225 00226 /* Function inlining */ 00227 #if defined(__GNUC__) 00228 # define INLINE __inline__ 00229 #elif defined(__MSC__) 00230 # define INLINE __inline 00231 #elif defined(_MSC_VER) 00232 # define INLINE __inline 00233 #elif defined(__ICL) 00234 # define INLINE __inline 00235 #elif defined(__INTEL_COMPILER) 00236 # define INLINE inline 00237 #elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100) 00238 # define INLINE __inline 00239 #elif defined(__SUNPRO_C) && defined(__C99FEATURES__) 00240 # define INLINE inline 00241 # define __inline inline 00242 # define __inline__ inline 00243 #elif (__STDC_VERSION__ >= 199901L) /* C99 */ 00244 # define INLINE inline 00245 #else 00246 # define INLINE 00247 #endif 00248 00249 00250 /* If we build the library with gcc's -fvisibility=hidden flag, we'll 00251 * use the PUBLIC macro to mark functions that are to be exported. 00252 * 00253 * We also need to define a USED attribute, so the optimizer doesn't 00254 * inline a static function that we later use in an alias. - ajax 00255 */ 00256 #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303 00257 # define PUBLIC __attribute__((visibility("default"))) 00258 # define USED __attribute__((used)) 00259 #else 00260 # define PUBLIC 00261 # define USED 00262 #endif 00263 00264 00265 /* Some compilers don't like some of Mesa's const usage */ 00266 #ifdef NO_CONST 00267 # define CONST 00268 #else 00269 # define CONST const 00270 #endif 00271 00272 00273 #if !defined(_WIN32_WCE) 00274 #if defined(BUILD_FOR_SNAP) && defined(CHECKED) 00275 # define ASSERT(X) _CHECK(X) 00276 #elif defined(DEBUG) 00277 # define ASSERT(X) assert(X) 00278 #else 00279 # define ASSERT(X) 00280 #endif 00281 #endif 00282 00283 00284 #if (!defined(__GNUC__) || __GNUC__ < 3) && (!defined(__IBMC__) || __IBMC__ < 900) 00285 # define __builtin_expect(x, y) x 00286 #endif 00287 00288 /* The __FUNCTION__ gcc variable is generally only used for debugging. 00289 * If we're not using gcc, define __FUNCTION__ as a cpp symbol here. 00290 * Don't define it if using a newer Windows compiler. 00291 */ 00292 #ifndef __FUNCTION__ 00293 # if defined(__VMS) 00294 # define __FUNCTION__ "VMS$NL:" 00295 # elif ((!defined __GNUC__) || (__GNUC__ < 2)) && (!defined __xlC__) && \ 00296 (!defined(_MSC_VER) || _MSC_VER < 1300) 00297 # if (__STDC_VERSION__ >= 199901L) /* C99 */ || \ 00298 (defined(__SUNPRO_C) && defined(__C99FEATURES__)) 00299 # define __FUNCTION__ __func__ 00300 # else 00301 # define __FUNCTION__ "<unknown>" 00302 # endif 00303 # endif 00304 #endif 00305 00306 00307 #include "config.h" 00308 00309 #endif /* GLHEADER_H */ Generated on Fri May 25 2012 04:18:24 for ReactOS by
1.7.6.1
|