home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mesa5.zip / mesa5src.zip / MesaDLL / GL / os2mesa.h < prev    next >
C/C++ Source or Header  |  2000-01-30  |  2KB  |  89 lines

  1. /* os2mesa.h */
  2.  
  3. #ifndef WMESA_H
  4. #define WMESA_H
  5.  
  6.  
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10.  
  11.  
  12. #include "gl\gl.h"
  13.  
  14. /* This is the WMesa context 'handle': */
  15. typedef struct wmesa_context *WMesaContext;
  16.  
  17.  
  18.  
  19. /*
  20.  * Create a new WMesaContext for rendering into a window.  You must
  21.  * have already created the window of correct visual type and with an
  22.  * appropriate colormap.
  23.  *
  24.  * Input:
  25.  *         hWnd - Window handle
  26.  *         Pal  - Palette to use
  27.  *         rgb_flag - GL_TRUE = RGB mode,
  28.  *                    GL_FALSE = color index mode
  29.  *         db_flag - GL_TRUE = double-buffered,
  30.  *                   GL_FALSE = single buffered
  31.  *
  32.  * Note: Indexed mode requires double buffering under Windows.
  33.  *
  34.  * Return:  a WMesa_context or NULL if error.
  35.  */
  36. extern  WMesaContext WMesaCreateContext
  37.         ( HWND hWnd, HPAL* Pal, HPS   hpsCurrent, HAB hab,
  38.                GLboolean rgb_flag, GLboolean db_flag, int useDive );
  39.  
  40.  
  41. /*
  42.  * Destroy a rendering context as returned by WMesaCreateContext()
  43.  */
  44. /*extern void WMesaDestroyContext( WMesaContext ctx );*/
  45. extern void WMesaDestroyContext( void );
  46.  
  47.  
  48. /*
  49.  * Make the specified context the current one.
  50.  */
  51. extern void WMesaMakeCurrent( WMesaContext ctx );
  52.  
  53.  
  54. /*
  55.  * Return a handle to the current context.
  56.  */
  57. extern WMesaContext WMesaGetCurrentContext( void );
  58.  
  59.  
  60. /*
  61.  * Swap the front and back buffers for the current context.  No action
  62.  * taken if the context is not double buffered.
  63.  */
  64. extern void WMesaSwapBuffers(void);
  65.  
  66.  
  67. /*
  68.  * In indexed color mode we need to know when the palette changes.
  69.  */
  70. extern void WMesaPaletteChange(HPAL Pal);
  71.  
  72. extern void WMesaMove(void);
  73.  
  74.  
  75. HGLRC wglCreateContext(HDC hdc,HPS hpsCurrent, HAB hab);
  76. BOOL wglCopyContext(HGLRC hglrcSrc,HGLRC hglrcDst,UINT mask);
  77. BOOL wglMakeCurrent(HDC hdc,HGLRC hglrc);
  78. BOOL wglSetPixelFormat(HDC hdc,int iPixelFormat,XVisualInfo *ppfd);
  79. int  wglGetPixelFormat(HDC hdc);
  80.  
  81.  
  82. #ifdef __cplusplus
  83. }
  84. #endif
  85.  
  86.  
  87. #endif
  88.  
  89.