1 /* $Id: wmesa.h,v 1.1.1.1 2002/02/01 06:35:43 tacyas 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.1.1 2002/02/01 06:35:43 tacyas
28 * Initail Import Into CVS
30 * Revision 3.0 1998/02/20 05:06:59 brianp
37 * Windows driver by: Mark E. Peterson (markp@ic.mankato.mn.us)
38 * Updated by Li Wei (liwei@aiar.xjtu.edu.cn)
41 ***************************************************************
47 * Institute of Artificial Intelligence & Robotics *
48 * Xi'an Jiaotong University *
49 * Email: liwei@aiar.xjtu.edu.cn *
50 * Web page: http://sun.aiar.xjtu.edu.cn *
53 ***************************************************************
69 #pragma warning (disable:4273)
70 #pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
71 #pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
72 #pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
73 #pragma warning( disable : 4013 ) /* 'function' undefined; assuming extern returning int */
74 #pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
75 #pragma warning( disable : 4273 ) /* 'identifier' : inconsistent DLL linkage. dllexport assumed */
76 #if (MESA_WARNQUIET>1)
77 # pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
81 * This is the WMesa context 'handle':
83 typedef struct wmesa_context *WMesaContext;
88 * Create a new WMesaContext for rendering into a window. You must
89 * have already created the window of correct visual type and with an
90 * appropriate colormap.
93 * hWnd - Window handle
94 * Pal - Palette to use
95 * rgb_flag - GL_TRUE = RGB mode,
96 * GL_FALSE = color index mode
97 * db_flag - GL_TRUE = double-buffered,
98 * GL_FALSE = single buffered
100 * Note: Indexed mode requires double buffering under Windows.
102 * Return: a WMesa_context or NULL if error.
104 extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
105 GLboolean rgb_flag,GLboolean db_flag);
109 * Destroy a rendering context as returned by WMesaCreateContext()
111 /*extern void WMesaDestroyContext( WMesaContext ctx );*/
112 extern void WMesaDestroyContext( void );
116 * Make the specified context the current one.
118 extern void WMesaMakeCurrent( WMesaContext ctx );
122 * Return a handle to the current context.
124 extern WMesaContext WMesaGetCurrentContext( void );
128 * Swap the front and back buffers for the current context. No action
129 * taken if the context is not double buffered.
131 extern void WMesaSwapBuffers(void);
135 * In indexed color mode we need to know when the palette changes.
137 extern void WMesaPaletteChange(HPALETTE Pal);
139 extern void WMesaMove(void);