#ifndef GLHEADER_H
#define GLHEADER_H
#if defined(XFree86LOADER) && defined(IN_MODULE)
#include "xf86_ansic.h"
#else
#include <assert.h>
#include <ctype.h>
#if defined(__alpha__) && defined(CCPML)
#include <cpml.h>
#else
#include <math.h>
#endif
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#if defined(__linux__) && defined(__i386__)
#include <fpu_control.h>
#endif
#endif
#include <float.h>
#include <stdarg.h>
#ifdef HAVE_CONFIG_H
#include "conf.h"
#endif
#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
# define __WIN32__
# define finite _finite
#endif
#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
# pragma warning( disable : 4068 )
# pragma warning( disable : 4710 )
# pragma warning( disable : 4711 )
# pragma warning( disable : 4127 )
# if defined(MESA_MINWARN)
# pragma warning( disable : 4244 )
# pragma warning( disable : 4018 )
# pragma warning( disable : 4305 )
# pragma warning( disable : 4550 )
# pragma warning( disable : 4761 )
# endif
# if defined(_MSC_VER) && defined(BUILD_GL32)
# define GLAPI __declspec(dllexport)
# define WGLAPI __declspec(dllexport)
# elif defined(_MSC_VER) && defined(_DLL)
# define GLAPI __declspec(dllimport)
# define WGLAPI __declspec(dllimport)
# else
# define GLAPI extern
# define WGLAPI __declspec(dllimport)
# endif
# define GLAPIENTRY __stdcall
# define GLAPIENTRYP __stdcall *
# define GLCALLBACK __stdcall
# define GLCALLBACKP __stdcall *
# if defined(__CYGWIN__)
# define GLCALLBACKPCAST *
# else
# define GLCALLBACKPCAST __stdcall *
# endif
# define GLWINAPI __stdcall
# define GLWINAPIV __cdecl
#else
# define GLAPIENTRY
# define GLAPIENTRYP *
# define GLCALLBACK
# define GLCALLBACKP *
# define GLCALLBACKPCAST *
# define GLWINAPI
# define GLWINAPIV
#endif
#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP) && !defined(__CYGWIN__)
#if 0
# define CALLBACK GLCALLBACK
typedef void *HGLRC;
typedef void *HDC;
#endif
typedef int (GLAPIENTRY *PROC)();
typedef unsigned long COLORREF;
#endif
#define GL_GLEXT_PROTOTYPES
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
# define WGL_FONT_LINES 0
# define WGL_FONT_POLYGONS 1
#ifndef _GNU_H_WINDOWS32_FUNCTIONS
# ifdef UNICODE
# define wglUseFontBitmaps wglUseFontBitmapsW
# define wglUseFontOutlines wglUseFontOutlinesW
# else
# define wglUseFontBitmaps wglUseFontBitmapsA
# define wglUseFontOutlines wglUseFontOutlinesA
# endif
#endif
typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
#if !defined(GLX_USE_MESA)
#include <gl/mesa_wgl.h>
#endif
#endif
#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN
#if defined(__linux__)
#include <byteswap.h>
#define CPU_TO_LE32( x ) bswap_32( x )
#else
#define CPU_TO_LE32( x ) ( x )
#endif
#define MESA_BIG_ENDIAN 1
#else
#define CPU_TO_LE32( x ) ( x )
#define MESA_LITTLE_ENDIAN 1
#endif
#define LE32_TO_CPU( x ) CPU_TO_LE32( x )
#ifdef _P
#undef _P
#endif
#include "GL/gl.h"
#include "GL/glext.h"
#ifndef CAPI
#ifdef WIN32
#define CAPI _cdecl
#else
#define CAPI
#endif
#endif
#include <GL/internal/glcore.h>
#ifdef __WATCOMC__
#pragma disable_message(201)
#endif
#ifdef CHECK
#undef CHECK
#endif
#ifndef _ASMAPI
#if !defined( __GNUC__ ) && !defined( VMS )
#define _ASMAPI __cdecl
#else
#define _ASMAPI
#endif
#ifdef PTR_DECL_IN_FRONT
#define _ASMAPIP * _ASMAPI
#else
#define _ASMAPIP _ASMAPI *
#endif
#endif
#ifdef USE_X86_ASM
#define _NORMAPI _ASMAPI
#define _NORMAPIP _ASMAPIP
#else
#define _NORMAPI
#define _NORMAPIP *
#endif
#if defined(__GNUC__)
# define INLINE __inline__
#elif defined(__MSC__)
# define INLINE __inline
#elif defined(_MSC_VER)
# define INLINE __inline
#elif defined(__ICL)
# define INLINE __inline
#else
# define INLINE
#endif
#if !defined(__GNUC__)
#define STRINGIZE(x) #x
#define STRINGIZE_EVAL(x) STRINGIZE(x)
#define __FUNCTION__ STRINGIZE_EVAL(__FILE__) ", line " STRINGIZE_EVAL(__LINE__)
#endif
#ifdef NO_CONST
# define CONST
#else
# define CONST const
#endif
#ifdef DEBUG
# define ASSERT(X) assert(X)
#else
# define ASSERT(X)
#endif
typedef union { GLfloat f; GLint i; } fi_type;
#endif