1 /* $Id: wmesa.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
4 * Mesa 3-D graphics library
6 * Copyright (C) 1995-1998 Brian Paul
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the Free
20 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 * Revision 1.1 1999/08/19 00:55:40 jtg
30 * Revision 3.2 1999/01/03 02:54:45 brianp
31 * updated per Ted Jump
33 * Revision 3.1 1998/12/01 02:34:27 brianp
34 * applied Mark Kilgard's patches from November 30, 1998
36 * Revision 3.0 1998/02/20 05:06:59 brianp
43 * Windows driver by: Mark E. Peterson (markp@ic.mankato.mn.us)
44 * Updated by Li Wei (liwei@aiar.xjtu.edu.cn)
47 ***************************************************************
53 * Institute of Artificial Intelligence & Robotics *
54 * Xi'an Jiaotong University *
55 * Email: liwei@aiar.xjtu.edu.cn *
56 * Web page: http://sun.aiar.xjtu.edu.cn *
59 ***************************************************************
74 #pragma warning (disable:4273)
75 #pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
76 #pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
77 #pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
78 #pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
79 #pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
80 #pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
81 #if (MESA_WARNQUIET>1)
82 # pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
86 * This is the WMesa context 'handle':
88 typedef struct wmesa_context
*WMesaContext
;
93 * Create a new WMesaContext for rendering into a window. You must
94 * have already created the window of correct visual type and with an
95 * appropriate colormap.
98 * hWnd - Window handle
99 * Pal - Palette to use
100 * rgb_flag - GL_TRUE = RGB mode,
101 * GL_FALSE = color index mode
102 * db_flag - GL_TRUE = double-buffered,
103 * GL_FALSE = single buffered
105 * Note: Indexed mode requires double buffering under Windows.
107 * Return: a WMesa_context or NULL if error.
109 extern WMesaContext
WMesaCreateContext(HWND hWnd
,HPALETTE
* pPal
,
110 GLboolean rgb_flag
,GLboolean db_flag
);
114 * Destroy a rendering context as returned by WMesaCreateContext()
116 /*extern void WMesaDestroyContext( WMesaContext ctx );*/
117 extern void WMesaDestroyContext( void );
122 * Make the specified context the current one.
124 extern void WMesaMakeCurrent( WMesaContext ctx
);
128 * Return a handle to the current context.
130 extern WMesaContext
WMesaGetCurrentContext( void );
134 * Swap the front and back buffers for the current context. No action
135 * taken if the context is not double buffered.
137 extern void WMesaSwapBuffers(void);
141 * In indexed color mode we need to know when the palette changes.
143 extern void WMesaPaletteChange(HPALETTE Pal
);
145 extern void WMesaMove(void);