Remove CVS keywords.
[mesa.git] / src / glu / mini / gluP.h
1
2 /*
3 * Mesa 3-D graphics library
4 * Version: 3.3
5 * Copyright (C) 1995-2000 Brian Paul
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */
21
22
23 /*
24 * This file allows the GLU code to be compiled either with the Mesa
25 * headers or with the real OpenGL headers.
26 */
27
28
29 #ifndef GLUP_H
30 #define GLUP_H
31
32
33 #include <GL/gl.h>
34 #include <GL/glu.h>
35 #include <string.h>
36
37
38 #if defined(_WIN32) && !defined(__WIN32__)
39 # define __WIN32__
40 #endif
41
42 #if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN__))
43 # pragma warning( disable : 4068 ) /* unknown pragma */
44 # pragma warning( disable : 4710 ) /* function 'foo' not inlined */
45 # pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */
46 # pragma warning( disable : 4127 ) /* conditional expression is constant */
47 # if defined(MESA_MINWARN)
48 # pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
49 # pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
50 # pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
51 # pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */
52 # pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
53 # endif
54 # if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
55 # define GLAPI __declspec(dllexport)
56 # define WGLAPI __declspec(dllexport)
57 # elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
58 # define GLAPI __declspec(dllimport)
59 # define WGLAPI __declspec(dllimport)
60 # else /* for use with static link lib build of Win32 edition only */
61 # define GLAPI extern
62 # define WGLAPI __declspec(dllimport)
63 # endif /* _STATIC_MESA support */
64 # define GLAPIENTRY __stdcall
65 # define GLAPIENTRYP __stdcall *
66 # define GLCALLBACK __stdcall
67 # define GLCALLBACKP __stdcall *
68 # if defined(__CYGWIN__)
69 # define GLCALLBACKPCAST *
70 # else
71 # define GLCALLBACKPCAST __stdcall *
72 # endif
73 # define GLWINAPI __stdcall
74 # define GLWINAPIV __cdecl
75 #else
76 /* non-Windows compilation */
77 # define GLAPI extern
78 # define GLAPIENTRY
79 # define GLAPIENTRYP *
80 # define GLCALLBACK
81 # define GLCALLBACKP *
82 # define GLCALLBACKPCAST *
83 # define GLWINAPI
84 # define GLWINAPIV
85 #endif /* WIN32 / CYGWIN bracket */
86
87 /* compatibility guard so we don't need to change client code */
88
89 #if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP)
90 # define CALLBACK GLCALLBACK
91 typedef int (GLAPIENTRY *PROC)();
92 typedef void *HGLRC;
93 typedef void *HDC;
94 typedef unsigned long COLORREF;
95 #endif
96
97 #if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
98 # define WGL_FONT_LINES 0
99 # define WGL_FONT_POLYGONS 1
100 #ifndef _GNU_H_WINDOWS32_FUNCTIONS
101 # ifdef UNICODE
102 # define wglUseFontBitmaps wglUseFontBitmapsW
103 # define wglUseFontOutlines wglUseFontOutlinesW
104 # else
105 # define wglUseFontBitmaps wglUseFontBitmapsA
106 # define wglUseFontOutlines wglUseFontOutlinesA
107 # endif /* !UNICODE */
108 #endif /* _GNU_H_WINDOWS32_FUNCTIONS */
109 typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
110 typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
111 typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
112 #include <gl/mesa_wgl.h>
113 #endif
114
115
116
117 #ifndef GLU_TESS_ERROR9
118 /* If we're using the real OpenGL header files... */
119 # define GLU_TESS_ERROR9 100159
120 #endif
121
122
123 #define GLU_NO_ERROR GL_NO_ERROR
124
125
126 /* for Sun: */
127 #ifdef SUNOS4
128 #define MEMCPY( DST, SRC, BYTES) \
129 memcpy( (char *) (DST), (char *) (SRC), (int) (BYTES) )
130 #else
131 #define MEMCPY( DST, SRC, BYTES) \
132 memcpy( (void *) (DST), (void *) (SRC), (size_t) (BYTES) )
133 #endif
134
135
136 #ifndef NULL
137 # define NULL 0
138 #endif
139
140
141 #endif