home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / newopg.zip / PGL.H < prev    next >
Text File  |  1995-03-04  |  3KB  |  86 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. #ifndef OS2
  12. #define OS2
  13. #endif
  14.  
  15. #define INCL_DOSPROCESS
  16. #define INCL_32
  17. #define INCL_DEV
  18. #define INCL_WIN
  19. #define INCL_DOS
  20. #define INCL_GRE_PALETTE
  21. #define INCL_GPI
  22. #define INCL_PM
  23. #include <os2.h>
  24. #include <gl.h>
  25.  
  26. typedef struct visualconfig {
  27.     unsigned long  vid;  /*Visual ID*/
  28.     BOOL   rgba;
  29.     int redSize, greenSize, blueSize, alphaSize;
  30.     ULONG redMask, greenMask, blueMask;
  31.     int accumRedSize, accumGreenSize, accumBlueSize, accumAlphaSize;
  32.     BOOL doubleBuffer;
  33.     BOOL  stereo;
  34.     int bufferSize;
  35.     int depthSize;
  36.     int stencilSize;
  37.     int auxBuffers;
  38.     int level;
  39.     PVOID reserved;
  40.     struct visualconfig *next;
  41.     } VISUALCONFIG, *PVISUALCONFIG;
  42.  
  43. typedef LHANDLE HGC;
  44.     
  45.  
  46. extern PVISUALCONFIG APIENTRY pglChooseConfig(HAB hab, int *attriblist);
  47. extern PVISUALCONFIG* APIENTRY pglQueryConfigs(HAB hab);
  48. extern HGC APIENTRY pglCreateContext(HAB hab, PVISUALCONFIG pVisualConfig, HGC Sharelist, BOOL IsDirect);
  49. extern BOOL APIENTRY pglMakeCurrent(HAB hab,HGC hgc, HWND hwnd);
  50. extern BOOL APIENTRY pglDestroyContext(HAB hab, HGC hgc);
  51. extern BOOL APIENTRY pglCopyContext(HAB hab, HGC hgc_src, HGC hgc_dst, GLuint attrib_mask);
  52. extern int APIENTRY pglSelectColorIndexPalette(HAB hab, HPAL hpal, HGC hgc);
  53. extern LONG APIENTRY pglIsIndirect(HAB hab, HGC hgc);
  54. extern HGC  APIENTRY pglGetCurrentContext(HAB hab);
  55. extern HWND APIENTRY pglGetCurrentWindow(HAB hab);
  56. extern HPS  APIENTRY pglWaitGL(HAB hab);
  57. extern void APIENTRY pglWaitPM(HAB hab);
  58. extern void APIENTRY pglSwapBuffers(HAB hab, HWND hwnd);
  59. extern LONG APIENTRY pglQueryCapability(HAB hab);
  60. extern void APIENTRY pglQueryVersion(HAB hab, int *major, int *minor);
  61. extern BOOL APIENTRY pglUsePMBitmapFont(HAB hab,LONG id, int first, int count, int listbase);
  62. extern BOOL APIENTRY pglGrabFrontBitmap(HAB hab,HPS *phps,HBITMAP *phbitmap);
  63. extern BOOL APIENTRY pglReleaseFrontBitmap(HAB hab);
  64.  
  65. #define  None            0x0
  66.  
  67. #define  PGL_USE_GL           1
  68. #define  PGL_BUFFER_SIZE       2
  69. #define  PGL_LEVEL           3
  70. #define  PGL_RGBA           4
  71. #define  PGL_DOUBLEBUFFER       5
  72. #define  PGL_STEREO           6
  73. #define  PGL_AUX_BUFFERS       7
  74. #define  PGL_RED_SIZE       8
  75. #define  PGL_GREEN_SIZE       9
  76. #define  PGL_BLUE_SIZE       10
  77. #define  PGL_ALPHA_SIZE       11
  78. #define  PGL_DEPTH_SIZE       12
  79. #define  PGL_STENCIL_SIZE       13
  80. #define  PGL_ACCUM_RED_SIZE       14
  81. #define  PGL_ACCUM_GREEN_SIZE   15
  82. #define  PGL_ACCUM_BLUE_SIZE       16
  83. #define  PGL_ACCUM_ALPHA_SIZE   17
  84. #define  PGL_SINGLEBUFFER       18
  85. #endif
  86.