1 | /**
|
---|
2 | * This file has no copyright assigned and is placed in the Public Domain.
|
---|
3 | * This file is part of the mingw-w64 runtime package.
|
---|
4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
---|
5 | */
|
---|
6 | #ifndef __GLAUX_H__
|
---|
7 | #define __GLAUX_H__
|
---|
8 |
|
---|
9 | #include <windows.h>
|
---|
10 | #include <GL/gl.h>
|
---|
11 | #include <GL/glu.h>
|
---|
12 |
|
---|
13 | #ifdef __cplusplus
|
---|
14 | extern "C" {
|
---|
15 | #endif
|
---|
16 |
|
---|
17 | #define AUX_RGB 0
|
---|
18 | #define AUX_RGBA AUX_RGB
|
---|
19 | #define AUX_INDEX 1
|
---|
20 | #define AUX_SINGLE 0
|
---|
21 | #define AUX_DOUBLE 2
|
---|
22 | #define AUX_DIRECT 0
|
---|
23 | #define AUX_INDIRECT 4
|
---|
24 |
|
---|
25 | #define AUX_ACCUM 8
|
---|
26 | #define AUX_ALPHA 16
|
---|
27 | #define AUX_DEPTH24 32
|
---|
28 | #define AUX_STENCIL 64
|
---|
29 | #define AUX_AUX 128
|
---|
30 | #define AUX_DEPTH16 256
|
---|
31 | #define AUX_FIXED_332_PAL 512
|
---|
32 | #define AUX_DEPTH AUX_DEPTH16
|
---|
33 |
|
---|
34 | #define AUX_WIND_IS_RGB(x) (((x) & AUX_INDEX)==0)
|
---|
35 | #define AUX_WIND_IS_INDEX(x) (((x) & AUX_INDEX)!=0)
|
---|
36 | #define AUX_WIND_IS_SINGLE(x) (((x) & AUX_DOUBLE)==0)
|
---|
37 | #define AUX_WIND_IS_DOUBLE(x) (((x) & AUX_DOUBLE)!=0)
|
---|
38 | #define AUX_WIND_IS_INDIRECT(x) (((x) & AUX_INDIRECT)!=0)
|
---|
39 | #define AUX_WIND_IS_DIRECT(x) (((x) & AUX_INDIRECT)==0)
|
---|
40 | #define AUX_WIND_HAS_ACCUM(x) (((x) & AUX_ACCUM)!=0)
|
---|
41 | #define AUX_WIND_HAS_ALPHA(x) (((x) & AUX_ALPHA)!=0)
|
---|
42 | #define AUX_WIND_HAS_DEPTH(x) (((x) & (AUX_DEPTH24 | AUX_DEPTH16))!=0)
|
---|
43 | #define AUX_WIND_HAS_STENCIL(x) (((x) & AUX_STENCIL)!=0)
|
---|
44 | #define AUX_WIND_USES_FIXED_332_PAL(x) (((x) & AUX_FIXED_332_PAL)!=0)
|
---|
45 |
|
---|
46 | typedef struct _AUX_EVENTREC {
|
---|
47 | GLint event;
|
---|
48 | GLint data[4];
|
---|
49 | } AUX_EVENTREC;
|
---|
50 |
|
---|
51 | #define AUX_EXPOSE 1
|
---|
52 | #define AUX_CONFIG 2
|
---|
53 | #define AUX_DRAW 4
|
---|
54 | #define AUX_KEYEVENT 8
|
---|
55 | #define AUX_MOUSEDOWN 16
|
---|
56 | #define AUX_MOUSEUP 32
|
---|
57 | #define AUX_MOUSELOC 64
|
---|
58 |
|
---|
59 | #define AUX_WINDOWX 0
|
---|
60 | #define AUX_WINDOWY 1
|
---|
61 | #define AUX_MOUSEX 0
|
---|
62 | #define AUX_MOUSEY 1
|
---|
63 | #define AUX_MOUSESTATUS 3
|
---|
64 | #define AUX_KEY 0
|
---|
65 | #define AUX_KEYSTATUS 1
|
---|
66 |
|
---|
67 | #define AUX_LEFTBUTTON 1
|
---|
68 | #define AUX_RIGHTBUTTON 2
|
---|
69 | #define AUX_MIDDLEBUTTON 4
|
---|
70 | #define AUX_SHIFT 1
|
---|
71 | #define AUX_CONTROL 2
|
---|
72 |
|
---|
73 | #define AUX_RETURN 0x0D
|
---|
74 | #define AUX_ESCAPE 0x1B
|
---|
75 | #define AUX_SPACE 0x20
|
---|
76 | #define AUX_LEFT 0x25
|
---|
77 | #define AUX_UP 0x26
|
---|
78 | #define AUX_RIGHT 0x27
|
---|
79 | #define AUX_DOWN 0x28
|
---|
80 | #define AUX_A 'A'
|
---|
81 | #define AUX_B 'B'
|
---|
82 | #define AUX_C 'C'
|
---|
83 | #define AUX_D 'D'
|
---|
84 | #define AUX_E 'E'
|
---|
85 | #define AUX_F 'F'
|
---|
86 | #define AUX_G 'G'
|
---|
87 | #define AUX_H 'H'
|
---|
88 | #define AUX_I 'I'
|
---|
89 | #define AUX_J 'J'
|
---|
90 | #define AUX_K 'K'
|
---|
91 | #define AUX_L 'L'
|
---|
92 | #define AUX_M 'M'
|
---|
93 | #define AUX_N 'N'
|
---|
94 | #define AUX_O 'O'
|
---|
95 | #define AUX_P 'P'
|
---|
96 | #define AUX_Q 'Q'
|
---|
97 | #define AUX_R 'R'
|
---|
98 | #define AUX_S 'S'
|
---|
99 | #define AUX_T 'T'
|
---|
100 | #define AUX_U 'U'
|
---|
101 | #define AUX_V 'V'
|
---|
102 | #define AUX_W 'W'
|
---|
103 | #define AUX_X 'X'
|
---|
104 | #define AUX_Y 'Y'
|
---|
105 | #define AUX_Z 'Z'
|
---|
106 | #define AUX_a 'a'
|
---|
107 | #define AUX_b 'b'
|
---|
108 | #define AUX_c 'c'
|
---|
109 | #define AUX_d 'd'
|
---|
110 | #define AUX_e 'e'
|
---|
111 | #define AUX_f 'f'
|
---|
112 | #define AUX_g 'g'
|
---|
113 | #define AUX_h 'h'
|
---|
114 | #define AUX_i 'i'
|
---|
115 | #define AUX_j 'j'
|
---|
116 | #define AUX_k 'k'
|
---|
117 | #define AUX_l 'l'
|
---|
118 | #define AUX_m 'm'
|
---|
119 | #define AUX_n 'n'
|
---|
120 | #define AUX_o 'o'
|
---|
121 | #define AUX_p 'p'
|
---|
122 | #define AUX_q 'q'
|
---|
123 | #define AUX_r 'r'
|
---|
124 | #define AUX_s 's'
|
---|
125 | #define AUX_t 't'
|
---|
126 | #define AUX_u 'u'
|
---|
127 | #define AUX_v 'v'
|
---|
128 | #define AUX_w 'w'
|
---|
129 | #define AUX_x 'x'
|
---|
130 | #define AUX_y 'y'
|
---|
131 | #define AUX_z 'z'
|
---|
132 | #define AUX_0 '0'
|
---|
133 | #define AUX_1 '1'
|
---|
134 | #define AUX_2 '2'
|
---|
135 | #define AUX_3 '3'
|
---|
136 | #define AUX_4 '4'
|
---|
137 | #define AUX_5 '5'
|
---|
138 | #define AUX_6 '6'
|
---|
139 | #define AUX_7 '7'
|
---|
140 | #define AUX_8 '8'
|
---|
141 | #define AUX_9 '9'
|
---|
142 |
|
---|
143 | #define AUX_FD 1
|
---|
144 | #define AUX_COLORMAP 3
|
---|
145 | #define AUX_GREYSCALEMAP 4
|
---|
146 | #define AUX_FOGMAP 5
|
---|
147 | #define AUX_ONECOLOR 6
|
---|
148 |
|
---|
149 | #define AUX_BLACK 0
|
---|
150 | #define AUX_RED 13
|
---|
151 | #define AUX_GREEN 14
|
---|
152 | #define AUX_YELLOW 15
|
---|
153 | #define AUX_BLUE 16
|
---|
154 | #define AUX_MAGENTA 17
|
---|
155 | #define AUX_CYAN 18
|
---|
156 | #define AUX_WHITE 19
|
---|
157 |
|
---|
158 | extern float auxRGBMap[20][3];
|
---|
159 |
|
---|
160 | #define AUX_SETCOLOR(x,y) (AUX_WIND_IS_RGB((x)) ? glColor3fv(auxRGBMap[(y)]) : glIndexf((y)))
|
---|
161 |
|
---|
162 | typedef struct _AUX_RGBImageRec {
|
---|
163 | GLint sizeX,sizeY;
|
---|
164 | unsigned char *data;
|
---|
165 | } AUX_RGBImageRec;
|
---|
166 |
|
---|
167 | void APIENTRY auxInitDisplayMode(GLenum);
|
---|
168 | void APIENTRY auxInitPosition(int,int,int,int);
|
---|
169 |
|
---|
170 | #ifdef UNICODE
|
---|
171 | #define auxInitWindow auxInitWindowW
|
---|
172 | #else
|
---|
173 | #define auxInitWindow auxInitWindowA
|
---|
174 | #endif
|
---|
175 | GLenum APIENTRY auxInitWindowA(LPCSTR);
|
---|
176 | GLenum APIENTRY auxInitWindowW(LPCWSTR);
|
---|
177 |
|
---|
178 | void APIENTRY auxCloseWindow(void);
|
---|
179 | void APIENTRY auxQuit(void);
|
---|
180 | void APIENTRY auxSwapBuffers(void);
|
---|
181 |
|
---|
182 | typedef void (CALLBACK *AUXMAINPROC)(void);
|
---|
183 | void APIENTRY auxMainLoop(AUXMAINPROC);
|
---|
184 |
|
---|
185 | typedef void (CALLBACK *AUXEXPOSEPROC)(int,int);
|
---|
186 | void APIENTRY auxExposeFunc(AUXEXPOSEPROC);
|
---|
187 |
|
---|
188 | typedef void (CALLBACK *AUXRESHAPEPROC)(GLsizei,GLsizei);
|
---|
189 | void APIENTRY auxReshapeFunc(AUXRESHAPEPROC);
|
---|
190 |
|
---|
191 | typedef void (CALLBACK *AUXIDLEPROC)(void);
|
---|
192 | void APIENTRY auxIdleFunc(AUXIDLEPROC);
|
---|
193 |
|
---|
194 | typedef void (CALLBACK *AUXKEYPROC)(void);
|
---|
195 | void APIENTRY auxKeyFunc(int,AUXKEYPROC);
|
---|
196 |
|
---|
197 | typedef void (CALLBACK *AUXMOUSEPROC)(AUX_EVENTREC *);
|
---|
198 | void APIENTRY auxMouseFunc(int,int,AUXMOUSEPROC);
|
---|
199 |
|
---|
200 | int APIENTRY auxGetColorMapSize(void);
|
---|
201 | void APIENTRY auxGetMouseLoc(int *,int *);
|
---|
202 | void APIENTRY auxSetOneColor(int,float,float,float);
|
---|
203 | void APIENTRY auxSetFogRamp(int,int);
|
---|
204 | void APIENTRY auxSetGreyRamp(void);
|
---|
205 | void APIENTRY auxSetRGBMap(int,float *);
|
---|
206 |
|
---|
207 | #ifdef UNICODE
|
---|
208 | #define auxRGBImageLoad auxRGBImageLoadW
|
---|
209 | #else
|
---|
210 | #define auxRGBImageLoad auxRGBImageLoadA
|
---|
211 | #endif
|
---|
212 | AUX_RGBImageRec *APIENTRY auxRGBImageLoadA(LPCSTR);
|
---|
213 | AUX_RGBImageRec *APIENTRY auxRGBImageLoadW(LPCWSTR);
|
---|
214 |
|
---|
215 | #ifdef UNICODE
|
---|
216 | #define auxDIBImageLoad auxDIBImageLoadW
|
---|
217 | #else
|
---|
218 | #define auxDIBImageLoad auxDIBImageLoadA
|
---|
219 | #endif
|
---|
220 | AUX_RGBImageRec *APIENTRY auxDIBImageLoadA(LPCSTR);
|
---|
221 | AUX_RGBImageRec *APIENTRY auxDIBImageLoadW(LPCWSTR);
|
---|
222 |
|
---|
223 | void APIENTRY auxCreateFont(void);
|
---|
224 |
|
---|
225 | #ifdef UNICODE
|
---|
226 | #define auxDrawStr auxDrawStrW
|
---|
227 | #else
|
---|
228 | #define auxDrawStr auxDrawStrA
|
---|
229 | #endif
|
---|
230 | void APIENTRY auxDrawStrA(LPCSTR);
|
---|
231 | void APIENTRY auxDrawStrW(LPCWSTR);
|
---|
232 |
|
---|
233 | void APIENTRY auxWireSphere(GLdouble);
|
---|
234 | void APIENTRY auxSolidSphere(GLdouble);
|
---|
235 | void APIENTRY auxWireCube(GLdouble);
|
---|
236 | void APIENTRY auxSolidCube(GLdouble);
|
---|
237 | void APIENTRY auxWireBox(GLdouble,GLdouble,GLdouble);
|
---|
238 | void APIENTRY auxSolidBox(GLdouble,GLdouble,GLdouble);
|
---|
239 | void APIENTRY auxWireTorus(GLdouble,GLdouble);
|
---|
240 | void APIENTRY auxSolidTorus(GLdouble,GLdouble);
|
---|
241 | void APIENTRY auxWireCylinder(GLdouble,GLdouble);
|
---|
242 | void APIENTRY auxSolidCylinder(GLdouble,GLdouble);
|
---|
243 | void APIENTRY auxWireIcosahedron(GLdouble);
|
---|
244 | void APIENTRY auxSolidIcosahedron(GLdouble);
|
---|
245 | void APIENTRY auxWireOctahedron(GLdouble);
|
---|
246 | void APIENTRY auxSolidOctahedron(GLdouble);
|
---|
247 | void APIENTRY auxWireTetrahedron(GLdouble);
|
---|
248 | void APIENTRY auxSolidTetrahedron(GLdouble);
|
---|
249 | void APIENTRY auxWireDodecahedron(GLdouble);
|
---|
250 | void APIENTRY auxSolidDodecahedron(GLdouble);
|
---|
251 | void APIENTRY auxWireCone(GLdouble,GLdouble);
|
---|
252 | void APIENTRY auxSolidCone(GLdouble,GLdouble);
|
---|
253 | void APIENTRY auxWireTeapot(GLdouble);
|
---|
254 | void APIENTRY auxSolidTeapot(GLdouble);
|
---|
255 |
|
---|
256 | HWND APIENTRY auxGetHWND(void);
|
---|
257 | HDC APIENTRY auxGetHDC(void);
|
---|
258 | HGLRC APIENTRY auxGetHGLRC(void);
|
---|
259 |
|
---|
260 | enum {
|
---|
261 | AUX_USE_ID = 1,AUX_EXACT_MATCH,AUX_MINIMUM_CRITERIA
|
---|
262 | };
|
---|
263 | void APIENTRY auxInitDisplayModePolicy(GLenum);
|
---|
264 | GLenum APIENTRY auxInitDisplayModeID(GLint);
|
---|
265 | GLenum APIENTRY auxGetDisplayModePolicy(void);
|
---|
266 | GLint APIENTRY auxGetDisplayModeID(void);
|
---|
267 | GLenum APIENTRY auxGetDisplayMode(void);
|
---|
268 |
|
---|
269 | #ifdef __cplusplus
|
---|
270 | }
|
---|
271 | #endif
|
---|
272 | #endif
|
---|