home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / mesa-1.2.8 / nt / mesagl32.h < prev    next >
C/C++ Source or Header  |  1996-05-27  |  2KB  |  92 lines

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