home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 5 / MA_Cover_5.iso / ppc / mesa / include / gl / wmesa.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-31  |  4.1 KB  |  149 lines

  1. /* File name wmesa 
  2.          for
  3. ***************************************************************
  4. *                     WMesa                                   *
  5. *                     version 2.3                             *    
  6. *                                                             *
  7. *                        By                                   *
  8. *                      Li Wei                                 *
  9. *       Institute of Artificial Intelligence & Robotics       *
  10. *       Xi'an Jiaotong University                             *
  11. *       Email: liwei@aiar.xjtu.edu.cn                         * 
  12. *       Web page: http://sun.aiar.xjtu.edu.cn                 *
  13. *                                                             *
  14. *           July 7th, 1997                                      *    
  15. ***************************************************************
  16. */
  17.  
  18. /* $Id: wmesa.h,v 1.2 1997/02/22 16:48:49 brianp Exp $ */
  19.  
  20. /*
  21.  * Mesa 3-D graphics library
  22.  * Version:  2.2
  23.  * Copyright (C) 1995-1997  Brian Paul
  24.  *
  25.  * This library is free software; you can redistribute it and/or
  26.  * modify it under the terms of the GNU Library General Public
  27.  * License as published by the Free Software Foundation; either
  28.  * version 2 of the License, or (at your option) any later version.
  29.  *
  30.  * This library is distributed in the hope that it will be useful,
  31.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  32.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  33.  * Library General Public License for more details.
  34.  *
  35.  * You should have received a copy of the GNU Library General Public
  36.  * License along with this library; if not, write to the Free
  37.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  38.  *
  39.  * Windows driver by: Mark E. Peterson (markp@ic.mankato.mn.us)
  40.  * Updated by Li Wei (liwei@aiar.xjtu.edu.cn)
  41.  *
  42.  */
  43.  
  44.  
  45. /*
  46.  * $Log: wmesa.h,v $
  47.  * Revision 1.3  1997/04/30 15:51:00  Li Wei (liwei@aiar.xjtu.edu.cn)
  48.  * extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE Pal,
  49.  *                                       GLboolean rgb_flag,GLboolean db_flag);
  50.  * changed to
  51.  * extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
  52.  *                                      GLboolean rgb_flag,GLboolean db_flag);
  53.  *
  54.  *
  55.  * $Log: wmesa.h,v $
  56.  * Revision 1.2  1997/02/22 16:48:49  brianp
  57.  * WMesaDestroyContext now takes no arguments
  58.  *
  59.  * Revision 1.1  1996/09/13 01:26:41  brianp
  60.  * Initial revision
  61.  *
  62.  */
  63.  
  64.  
  65.  
  66. #ifndef WMESA_H
  67. #define WMESA_H
  68.  
  69.  
  70. #ifdef __cplusplus
  71. extern "C" {
  72. #endif
  73.  
  74.  
  75. #include <windows.h>
  76. #include "gl\gl.h"
  77.  
  78.  
  79. /*
  80.  * This is the WMesa context 'handle':
  81.  */
  82. typedef struct wmesa_context *WMesaContext;
  83.  
  84.  
  85.  
  86. /*
  87.  * Create a new WMesaContext for rendering into a window.  You must
  88.  * have already created the window of correct visual type and with an
  89.  * appropriate colormap.
  90.  *
  91.  * Input:
  92.  *         hWnd - Window handle
  93.  *         Pal  - Palette to use
  94.  *         rgb_flag - GL_TRUE = RGB mode,
  95.  *                    GL_FALSE = color index mode
  96.  *         db_flag - GL_TRUE = double-buffered,
  97.  *                   GL_FALSE = single buffered
  98.  *
  99.  * Note: Indexed mode requires double buffering under Windows.
  100.  *
  101.  * Return:  a WMesa_context or NULL if error.
  102.  */
  103. extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
  104.                                        GLboolean rgb_flag,GLboolean db_flag);
  105.  
  106.  
  107. /*
  108.  * Destroy a rendering context as returned by WMesaCreateContext()
  109.  */
  110. /*extern void WMesaDestroyContext( WMesaContext ctx );*/
  111. extern void WMesaDestroyContext( void );
  112.  
  113.  
  114. /*
  115.  * Make the specified context the current one.
  116.  */
  117. extern void WMesaMakeCurrent( WMesaContext ctx );
  118.  
  119.  
  120. /*
  121.  * Return a handle to the current context.
  122.  */
  123. extern WMesaContext WMesaGetCurrentContext( void );
  124.  
  125.  
  126. /*
  127.  * Swap the front and back buffers for the current context.  No action
  128.  * taken if the context is not double buffered.
  129.  */
  130. extern void WMesaSwapBuffers(void);
  131.  
  132.  
  133. /*
  134.  * In indexed color mode we need to know when the palette changes.
  135.  */
  136. extern void WMesaPaletteChange(HPALETTE Pal);
  137.  
  138. extern void WMesaMove(void);
  139.  
  140.  
  141.  
  142. #ifdef __cplusplus
  143. }
  144. #endif
  145.  
  146.  
  147. #endif
  148.  
  149.