glaux.h 6.7 KB

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