BVB Source Codes

Glut in the VC++ class library: glaux.h GL.h Glu.h glext.h Show glaux.h Source code

Return Download Glut in the VC++ class library: glaux.h GL.h Glu.h glext.h: download glaux.h Source code - Download Glut in the VC++ class library: glaux.h GL.h Glu.h glext.h Source code - Type:.h
  1. /*++ BUILD Version: 0004    // Increment this if a change has global effects
  2.  
  3. Download by http://www.bvbsoft.com
  4.  
  5. Copyright (c) 1985-95, Microsoft Corporation
  6.  
  7. Module Name:
  8.  
  9.     glaux.h
  10.  
  11. Abstract:
  12.  
  13.     Procedure declarations, constant definitions and macros for the OpenGL
  14.     Auxiliary Library.
  15.  
  16. --*/
  17.  
  18. #ifndef __GLAUX_H__
  19. #define __GLAUX_H__
  20.  
  21. /*
  22.  * (c) Copyright 1993, Silicon Graphics, Inc.
  23.  * ALL RIGHTS RESERVED
  24.  * Permission to use, copy, modify, and distribute this software for
  25.  * any purpose and without fee is hereby granted, provided that the above
  26.  * copyright notice appear in all copies and that both the copyright notice
  27.  * and this permission notice appear in supporting documentation, and that
  28.  * the name of Silicon Graphics, Inc. not be used in advertising
  29.  * or publicity pertaining to distribution of the software without specific,
  30.  * written prior permission.
  31.  *
  32.  * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
  33.  * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
  34.  * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
  35.  * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
  36.  * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
  37.  * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
  38.  * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
  39.  * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
  40.  * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
  41.  * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
  42.  * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
  43.  * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
  44.  *
  45.  * US Government Users Restricted Rights
  46.  * Use, duplication, or disclosure by the Government is subject to
  47.  * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
  48.  * (c)(1)(ii) of the Rights in Technical Data and Computer Software
  49.  * clause at DFARS 252.227-7013 and/or in similar or successor
  50.  * clauses in the FAR or the DOD or NASA FAR Supplement.
  51.  * Unpublished-- rights reserved under the copyright laws of the
  52.  * United States.  Contractor/manufacturer is Silicon Graphics,
  53.  * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
  54.  *
  55.  * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
  56.  */
  57.  
  58. #include <windows.h>
  59. #include "gl\gl.h"             
  60. #include "gl\glu.h"
  61.  
  62. #ifdef __cplusplus
  63. extern "C" {
  64. #endif
  65.  
  66. /*
  67. ** ToolKit Window Types
  68. ** In the future, AUX_RGBA may be a combination of both RGB and ALPHA
  69. */
  70.  
  71. #define AUX_RGB             0
  72. #define AUX_RGBA            AUX_RGB
  73. #define AUX_INDEX           1
  74. #define AUX_SINGLE          0
  75. #define AUX_DOUBLE          2
  76. #define AUX_DIRECT          0
  77. #define AUX_INDIRECT        4
  78.  
  79. #define AUX_ACCUM           8
  80. #define AUX_ALPHA           16
  81. #define AUX_DEPTH24         32      /* 24-bit depth buffer */
  82. #define AUX_STENCIL         64
  83. #define AUX_AUX             128
  84. #define AUX_DEPTH16         256     /* 16-bit depth buffer */
  85. #define AUX_FIXED_332_PAL   512
  86. #define AUX_DEPTH           AUX_DEPTH16 /* default is 16-bit depth buffer */
  87.  
  88. /*
  89. ** Window Masks
  90. */
  91.  
  92. #define AUX_WIND_IS_RGB(x)      (((x) & AUX_INDEX) == 0)
  93. #define AUX_WIND_IS_INDEX(x)    (((x) & AUX_INDEX) != 0)
  94. #define AUX_WIND_IS_SINGLE(x)   (((x) & AUX_DOUBLE) == 0)
  95. #define AUX_WIND_IS_DOUBLE(x)   (((x) & AUX_DOUBLE) != 0)
  96. #define AUX_WIND_IS_INDIRECT(x) (((x) & AUX_INDIRECT) != 0)
  97. #define AUX_WIND_IS_DIRECT(x)   (((x) & AUX_INDIRECT) == 0)
  98. #define AUX_WIND_HAS_ACCUM(x)   (((x) & AUX_ACCUM) != 0)
  99. #define AUX_WIND_HAS_ALPHA(x)   (((x) & AUX_ALPHA) != 0)
  100. #define AUX_WIND_HAS_DEPTH(x)   (((x) & (AUX_DEPTH24 | AUX_DEPTH16)) != 0)
  101. #define AUX_WIND_HAS_STENCIL(x) (((x) & AUX_STENCIL) != 0)
  102. #define AUX_WIND_USES_FIXED_332_PAL(x)  (((x) & AUX_FIXED_332_PAL) != 0)
  103.  
  104. /*
  105. ** ToolKit Event Structure
  106. */
  107.  
  108. typedef struct _AUX_EVENTREC {
  109.     GLint event;
  110.     GLint data[4];
  111. } AUX_EVENTREC;
  112.  
  113. /*
  114. ** ToolKit Event Types
  115. */
  116. #define AUX_EXPOSE      1
  117. #define AUX_CONFIG      2
  118. #define AUX_DRAW        4
  119. #define AUX_KEYEVENT    8
  120. #define AUX_MOUSEDOWN   16
  121. #define AUX_MOUSEUP     32
  122. #define AUX_MOUSELOC    64
  123.  
  124. /*
  125. ** Toolkit Event Data Indices
  126. */
  127. #define AUX_WINDOWX             0
  128. #define AUX_WINDOWY             1
  129. #define AUX_MOUSEX              0
  130. #define AUX_MOUSEY              1
  131. #define AUX_MOUSESTATUS         3
  132. #define AUX_KEY                 0
  133. #define AUX_KEYSTATUS           1
  134.  
  135. /*
  136. ** ToolKit Event Status Messages
  137. */
  138. #define AUX_LEFTBUTTON          1
  139. #define AUX_RIGHTBUTTON         2
  140. #define AUX_MIDDLEBUTTON        4
  141. #define AUX_SHIFT               1
  142. #define AUX_CONTROL             2
  143.  
  144. /*
  145. ** ToolKit Key Codes
  146. */
  147. #define AUX_RETURN              0x0D
  148. #define AUX_ESCAPE              0x1B
  149. #define AUX_SPACE               0x20
  150. #define AUX_LEFT                0x25
  151. #define AUX_UP                  0x26
  152. #define AUX_RIGHT               0x27
  153. #define AUX_DOWN                0x28
  154. #define AUX_A                   'A'
  155. #define AUX_B                   'B'
  156. #define AUX_C                   'C'
  157. #define AUX_D                   'D'
  158. #define AUX_E                   'E'
  159. #define AUX_F                   'F'
  160. #define AUX_G                   'G'
  161. #define AUX_H                   'H'
  162. #define AUX_I                   'I'
  163. #define AUX_J                   'J'
  164. #define AUX_K                   'K'
  165. #define AUX_L                   'L'
  166. #define AUX_M                   'M'
  167. #define AUX_N                   'N'
  168. #define AUX_O                   'O'
  169. #define AUX_P                   'P'
  170. #define AUX_Q                   'Q'
  171. #define AUX_R                   'R'
  172. #define AUX_S                   'S'
  173. #define AUX_T                   'T'
  174. #define AUX_U                   'U'
  175. #define AUX_V                   'V'
  176. #define AUX_W                   'W'
  177. #define AUX_X                   'X'
  178. #define AUX_Y                   'Y'
  179. #define AUX_Z                   'Z'
  180. #define AUX_a                   'a'
  181. #define AUX_b                   'b'
  182. #define AUX_c                   'c'
  183. #define AUX_d                   'd'
  184. #define AUX_e                   'e'
  185. #define AUX_f                   'f'
  186. #define AUX_g                   'g'
  187. #define AUX_h                   'h'
  188. #define AUX_i                   'i'
  189. #define AUX_j                   'j'
  190. #define AUX_k                   'k'
  191. #define AUX_l                   'l'
  192. #define AUX_m                   'm'
  193. #define AUX_n                   'n'
  194. #define AUX_o                   'o'
  195. #define AUX_p                   'p'
  196. #define AUX_q                   'q'
  197. #define AUX_r                   'r'
  198. #define AUX_s                   's'
  199. #define AUX_t                   't'
  200. #define AUX_u                   'u'
  201. #define AUX_v                   'v'
  202. #define AUX_w                   'w'
  203. #define AUX_x                   'x'
  204. #define AUX_y                   'y'
  205. #define AUX_z                   'z'
  206. #define AUX_0                   '0'
  207. #define AUX_1                   '1'
  208. #define AUX_2                   '2'
  209. #define AUX_3                   '3'
  210. #define AUX_4                   '4'
  211. #define AUX_5                   '5'
  212. #define AUX_6                   '6'
  213. #define AUX_7                   '7'
  214. #define AUX_8                   '8'
  215. #define AUX_9                   '9'
  216.  
  217. /*
  218. ** ToolKit Gets and Sets
  219. */
  220. #define AUX_FD                  1  /* return fd (long) */
  221. #define AUX_COLORMAP            3  /* pass buf of r, g and b (unsigned char) */
  222. #define AUX_GREYSCALEMAP        4
  223. #define AUX_FOGMAP              5  /* pass fog and color bits (long) */
  224. #define AUX_ONECOLOR            6  /* pass index, r, g, and b (long) */
  225.  
  226. /*
  227. ** Color Macros
  228. */
  229.  
  230. #define AUX_BLACK               0
  231. #define AUX_RED                 13
  232. #define AUX_GREEN               14
  233. #define AUX_YELLOW              15
  234. #define AUX_BLUE                16
  235. #define AUX_MAGENTA             17
  236. #define AUX_CYAN                18
  237. #define AUX_WHITE               19
  238.  
  239. extern float auxRGBMap[20][3];
  240.  
  241. #define AUX_SETCOLOR(x, y) (AUX_WIND_IS_RGB((x)) ? \
  242.                            glColor3fv(auxRGBMap[(y)]) : glIndexf((y)))
  243.  
  244. /*
  245. ** RGB Image Structure
  246. */
  247.  
  248. typedef struct _AUX_RGBImageRec {
  249.     GLint sizeX, sizeY;
  250.     unsigned char *data;
  251. } AUX_RGBImageRec;
  252.  
  253. /*
  254. ** Prototypes
  255. */
  256.  
  257. void APIENTRY auxInitDisplayMode(GLenum);
  258. void APIENTRY auxInitPosition(int, int, int, int);
  259.  
  260. /* GLenum APIENTRY auxInitWindow(LPCTSTR); */
  261. #ifdef UNICODE
  262. #define auxInitWindow auxInitWindowW
  263. #else
  264. #define auxInitWindow auxInitWindowA
  265. #endif
  266. GLenum APIENTRY auxInitWindowA(LPCSTR);
  267. GLenum APIENTRY auxInitWindowW(LPCWSTR);
  268.  
  269. void APIENTRY auxCloseWindow(void);
  270. void APIENTRY auxQuit(void);
  271. void APIENTRY auxSwapBuffers(void);
  272.  
  273. typedef void (CALLBACK* AUXMAINPROC)(void);
  274. void APIENTRY auxMainLoop(AUXMAINPROC);
  275.  
  276. typedef void (CALLBACK* AUXEXPOSEPROC)(int, int);
  277. void APIENTRY auxExposeFunc(AUXEXPOSEPROC);
  278.  
  279. typedef void (CALLBACK* AUXRESHAPEPROC)(GLsizei, GLsizei);
  280. void APIENTRY auxReshapeFunc(AUXRESHAPEPROC);
  281.  
  282. typedef void (CALLBACK* AUXIDLEPROC)(void);
  283. void APIENTRY auxIdleFunc(AUXIDLEPROC);
  284.  
  285. typedef void (CALLBACK* AUXKEYPROC)(void);
  286. void APIENTRY auxKeyFunc(int, AUXKEYPROC);
  287.  
  288. typedef void (CALLBACK* AUXMOUSEPROC)(AUX_EVENTREC *);
  289. void APIENTRY auxMouseFunc(int, int, AUXMOUSEPROC);
  290.  
  291. int  APIENTRY auxGetColorMapSize(void);
  292. void APIENTRY auxGetMouseLoc(int *, int *);
  293. void APIENTRY auxSetOneColor(int, float, float, float);
  294. void APIENTRY auxSetFogRamp(int, int);
  295. void APIENTRY auxSetGreyRamp(void);
  296. void APIENTRY auxSetRGBMap(int, float *);
  297.  
  298. /* AUX_RGBImageRec * APIENTRY auxRGBImageLoad(LPCTSTR); */
  299. #ifdef UNICODE
  300. #define auxRGBImageLoad auxRGBImageLoadW
  301. #else
  302. #define auxRGBImageLoad auxRGBImageLoadA
  303. #endif
  304. AUX_RGBImageRec * APIENTRY auxRGBImageLoadA(LPCSTR);
  305. AUX_RGBImageRec * APIENTRY auxRGBImageLoadW(LPCWSTR);
  306.  
  307. #ifdef UNICODE
  308. #define auxDIBImageLoad auxDIBImageLoadW
  309. #else
  310. #define auxDIBImageLoad auxDIBImageLoadA
  311. #endif
  312. AUX_RGBImageRec * APIENTRY auxDIBImageLoadA(LPCSTR);
  313. AUX_RGBImageRec * APIENTRY auxDIBImageLoadW(LPCWSTR);
  314.  
  315. void APIENTRY auxCreateFont(void);
  316. /* void APIENTRY auxDrawStr(LPCTSTR); */
  317. #ifdef UNICODE
  318. #define auxDrawStr auxDrawStrW
  319. #else
  320. #define auxDrawStr auxDrawStrA
  321. #endif
  322. void APIENTRY auxDrawStrA(LPCSTR);
  323. void APIENTRY auxDrawStrW(LPCWSTR);
  324.  
  325. void APIENTRY auxWireSphere(GLdouble);
  326. void APIENTRY auxSolidSphere(GLdouble);
  327. void APIENTRY auxWireCube(GLdouble);
  328. void APIENTRY auxSolidCube(GLdouble);
  329. void APIENTRY auxWireBox(GLdouble, GLdouble, GLdouble);
  330. void APIENTRY auxSolidBox(GLdouble, GLdouble, GLdouble);
  331. void APIENTRY auxWireTorus(GLdouble, GLdouble);
  332. void APIENTRY auxSolidTorus(GLdouble, GLdouble);
  333. void APIENTRY auxWireCylinder(GLdouble, GLdouble);
  334. void APIENTRY auxSolidCylinder(GLdouble, GLdouble);
  335. void APIENTRY auxWireIcosahedron(GLdouble);
  336. void APIENTRY auxSolidIcosahedron(GLdouble);
  337. void APIENTRY auxWireOctahedron(GLdouble);
  338. void APIENTRY auxSolidOctahedron(GLdouble);
  339. void APIENTRY auxWireTetrahedron(GLdouble);
  340. void APIENTRY auxSolidTetrahedron(GLdouble);
  341. void APIENTRY auxWireDodecahedron(GLdouble);
  342. void APIENTRY auxSolidDodecahedron(GLdouble);
  343. void APIENTRY auxWireCone(GLdouble, GLdouble);
  344. void APIENTRY auxSolidCone(GLdouble, GLdouble);
  345. void APIENTRY auxWireTeapot(GLdouble);
  346. void APIENTRY auxSolidTeapot(GLdouble);
  347.  
  348. /*
  349. ** Window specific functions
  350. ** hwnd, hdc, and hglrc valid after auxInitWindow()
  351. */
  352. HWND  APIENTRY auxGetHWND(void);
  353. HDC   APIENTRY auxGetHDC(void);
  354. HGLRC APIENTRY auxGetHGLRC(void);
  355.  
  356. /*
  357. ** Viewperf support functions and constants
  358. */
  359. /* Display Mode Selection Criteria */
  360. enum {
  361.     AUX_USE_ID = 1,
  362.     AUX_EXACT_MATCH,
  363.     AUX_MINIMUM_CRITERIA
  364. };
  365. void   APIENTRY auxInitDisplayModePolicy(GLenum);
  366. GLenum APIENTRY auxInitDisplayModeID(GLint);
  367. GLenum APIENTRY auxGetDisplayModePolicy(void);
  368. GLint  APIENTRY auxGetDisplayModeID(void);
  369. GLenum APIENTRY auxGetDisplayMode(void);
  370.  
  371. #ifdef __cplusplus
  372. }
  373. #endif
  374.  
  375. #endif /* __GLAUX_H__ */
  376.  
downloadglaux.h Source code - Download Glut in the VC++ class library: glaux.h GL.h Glu.h glext.h Source code
Related Source Codes/Software:
Automatic Dialer C++ source code - Once by chance, a friend to an AutoDial disconnect... 2012-02-18
A CFileDlgEx of VC++ enhanced file dialog box - A VC++ CFileDlgEx for enhanced file dialog box, yo... 2012-02-18
A beautiful VC++ log interface - A beautiful VC++ the login interface, let's take a... 2012-02-18
In the VC++ form inserts an input control in the status bar - In VC++ form state bar in the Insert entered contr... 2012-02-18
VC++ implementation of the modal dialog box - VC++ implementation of die State dialog box, throu... 2012-02-18
A Vc++ multiple-step form, can be used to install the program - A Vc++ multiple-step form, you can use to install ... 2012-02-18
Microsoft provides free C++ compiler - FreeCL use similar. Net coding style and rapid dev... 2012-02-18
3D OpenGL technology Russia block games, VC++ - VC++ 3D based on OpenGL technology to realize Russ... 2012-02-18
VC++.NET Gets the same directory as the current running program - VC++.NET Gets the same directory as the currently ... 2012-02-18
C++ written UPX compressed extract source v3 - Prepared UPX compressed extract the source code, v... 2012-02-18
Delphi interface mode make a DLL file - Delphi DLL files using the interface mode making W... 2012-02-18
Quota calculation system for Delphi source code - Delphi complete the quota calculation system of so... 2012-02-18
Small example of the Xml configuration file for Delphi - Delphi uses Xml configuration files within the fil... 2012-02-18
Written in Delphi process shared memory and message passing between the component source code - Own use a shared memory components for Delphi, for... 2012-02-18
Delphi tips (typical source database instance) - Life tips program written in Delphi, using interfa... 2012-02-18
Code written in Delphi with Access management program - This code modified by an older version on a networ... 2012-02-18
Delphi network speed with source code - Network speed written in Delphi source code, might... 2012-02-18
Delphi version of backgammon game source code - Delphi version of Backgammon program, computer and... 2012-02-18
Delphi home decoration assistants knowledge "database system" - Delphi version of article system, article content ... 2012-02-18
Mine-warfare game changer Delphi Source Edition - Mine-warfare game changer Delphi Source Edition, f... 2012-02-18

 Back to top