home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / gl / pgl.h < prev    next >
C/C++ Source or Header  |  1999-05-11  |  5KB  |  130 lines

  1.  
  2.  
  3. /*=================================================
  4. Contains defines needed for api level interface with 
  5. pgl. 
  6. ===================================================*/
  7.  
  8. #ifndef PGL_DEFINE
  9. #define PGL_DEFINE
  10.  
  11.  
  12. #if !defined (NT)
  13. #ifndef OS2
  14. #define OS2
  15. #endif
  16. #endif /* NT */
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22. #define INCL_DOSPROCESS
  23. #define INCL_32
  24. #define INCL_DEV
  25. #define INCL_WIN
  26. #define INCL_DOS
  27. #define INCL_GRE_PALETTE
  28. #define INCL_GPI
  29. #define INCL_PM
  30. #if defined (NT)
  31. #include <windows.h>
  32. #include <windef.h>
  33. #include <wingdi.h>
  34. #include <mapi.h>
  35. #include "os22nt.h"
  36. #else
  37. #include <os2.h>
  38. #endif /* NT */
  39.  
  40. #include <gl.h>
  41.  
  42. typedef struct visualconfig {
  43.     unsigned long  vid;  /*Visual ID*/
  44.     BOOL   rgba;
  45.     int redSize, greenSize, blueSize, alphaSize;
  46.     ULONG redMask, greenMask, blueMask;
  47.     int accumRedSize, accumGreenSize, accumBlueSize, accumAlphaSize;
  48.     BOOL doubleBuffer;
  49.     BOOL  stereo;
  50.     int bufferSize;
  51.     int depthSize;
  52.     int stencilSize;
  53.     int auxBuffers;
  54.     int level;
  55.     PVOID reserved;
  56.     struct visualconfig *next;
  57.     } VISUALCONFIG, *PVISUALCONFIG;
  58.  
  59. typedef LHANDLE HGC;
  60.     
  61.  
  62. #if defined (NT)
  63. extern PVISUALCONFIG APIENTRY pglChooseConfig(HINSTANCE hInstance, int *attriblist);
  64. extern PVISUALCONFIG* APIENTRY pglQueryConfigs(HINSTANCE hInstance);
  65. extern HGC APIENTRY pglCreateContext(HINSTANCE hInstance, PVISUALCONFIG pVisualConfig, HGC Sharelist, BOOL IsDirect);
  66. extern BOOL APIENTRY pglMakeCurrent(HINSTANCE hInstance,HGC hgc, HWND hwnd);
  67. extern BOOL APIENTRY pglDestroyContext(HINSTANCE hInstance, HGC hgc);
  68. extern BOOL APIENTRY pglCopyContext(HINSTANCE hInstance, HGC hgc_src, HGC hgc_dst, GLuint attrib_mask);
  69. extern int APIENTRY pglSelectColorIndexPalette(HINSTANCE hInstance, HPALETTE hpal, HGC hgc);
  70. extern LONG APIENTRY pglIsIndirect(HINSTANCE hInstance, HGC hgc);
  71. extern HGC  APIENTRY pglGetCurrentContext(HINSTANCE hInstance);
  72. extern HWND APIENTRY pglGetCurrentWindow(HINSTANCE hInstance);
  73. extern HDC  APIENTRY pglWaitGL(HINSTANCE hInstance);
  74. extern void APIENTRY pglWaitPM(HINSTANCE hInstance);
  75. extern void APIENTRY pglSwapBuffers(HINSTANCE hInstance, HWND hwnd);
  76. extern LONG APIENTRY pglQueryCapability(HINSTANCE hInstance);
  77. extern void APIENTRY pglQueryVersion(HINSTANCE hInstance, int *major, int *minor);
  78. extern BOOL APIENTRY pglUsePMBitmapFont(HINSTANCE hInstance, LONG id, int first, int count, int listbase);
  79. extern BOOL APIENTRY pglGrabFrontBitmap(HINSTANCE hInstance,HDC *phps,HBITMAP *phbitmap);
  80. extern BOOL APIENTRY pglReleaseFrontBitmap(HINSTANCE hInstance);
  81. extern BOOL APIENTRY pglUseFont(HINSTANCE,HDC,LOGFONT *,long,int,int,int);
  82. #else /* OS2 */
  83. extern PVISUALCONFIG APIENTRY pglChooseConfig(HAB hab, int *attriblist);
  84. extern PVISUALCONFIG* APIENTRY pglQueryConfigs(HAB hab);
  85. extern HGC APIENTRY pglCreateContext(HAB hab, PVISUALCONFIG pVisualConfig, HGC Sharelist, BOOL IsDirect);
  86. extern BOOL APIENTRY pglMakeCurrent(HAB hab,HGC hgc, HWND hwnd);
  87. extern BOOL APIENTRY pglDestroyContext(HAB hab, HGC hgc);
  88. extern BOOL APIENTRY pglCopyContext(HAB hab, HGC hgc_src, HGC hgc_dst, GLuint attrib_mask);
  89. extern int APIENTRY pglSelectColorIndexPalette(HAB hab, HPAL hpal, HGC hgc);
  90. extern LONG APIENTRY pglIsIndirect(HAB hab, HGC hgc);
  91. extern HGC  APIENTRY pglGetCurrentContext(HAB hab);
  92. extern HWND APIENTRY pglGetCurrentWindow(HAB hab);
  93. extern HPS  APIENTRY pglWaitGL(HAB hab);
  94. extern void APIENTRY pglWaitPM(HAB hab);
  95. extern void APIENTRY pglSwapBuffers(HAB hab, HWND hwnd);
  96. extern LONG APIENTRY pglQueryCapability(HAB hab);
  97. extern void APIENTRY pglQueryVersion(HAB hab, int *major, int *minor);
  98. extern BOOL APIENTRY pglUsePMBitmapFont(HAB hab, LONG id, int first, int count, int listbase);
  99. extern BOOL APIENTRY pglGrabFrontBitmap(HAB hab,HPS *phps,HBITMAP *phbitmap);
  100. extern BOOL APIENTRY pglReleaseFrontBitmap(HAB hab);
  101. extern BOOL APIENTRY pglUseFont(HAB,HPS,FATTRS *,long,int,int,int);
  102. #endif /* NT */
  103.  
  104. #define  None            0x0
  105.  
  106. #define  PGL_USE_GL           1
  107. #define  PGL_BUFFER_SIZE       2
  108. #define  PGL_LEVEL           3
  109. #define  PGL_RGBA           4
  110. #define  PGL_DOUBLEBUFFER       5
  111. #define  PGL_STEREO           6
  112. #define  PGL_AUX_BUFFERS       7
  113. #define  PGL_RED_SIZE       8
  114. #define  PGL_GREEN_SIZE       9
  115. #define  PGL_BLUE_SIZE       10
  116. #define  PGL_ALPHA_SIZE       11
  117. #define  PGL_DEPTH_SIZE       12
  118. #define  PGL_STENCIL_SIZE       13
  119. #define  PGL_ACCUM_RED_SIZE       14
  120. #define  PGL_ACCUM_GREEN_SIZE   15
  121. #define  PGL_ACCUM_BLUE_SIZE       16
  122. #define  PGL_ACCUM_ALPHA_SIZE   17
  123. #define  PGL_SINGLEBUFFER       18
  124.  
  125. #ifdef __cplusplus
  126. }
  127. #endif
  128.  
  129. #endif
  130.