OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / ALPHALINUX5 / util / ALPHALINUX5 / include / GL / wmesa.h
1 /* $Id: wmesa.h,v 1.1.1.1 2002/02/01 06:35:43 tacyas Exp $ */
2
3 /*
4  * Mesa 3-D graphics library
5  * Version:  3.0
6  * Copyright (C) 1995-1998  Brian Paul
7  *
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.
12  *
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.
17  *
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.
21  *
22  */
23
24
25 /*
26  * $Log: wmesa.h,v $
27  * Revision 1.1.1.1  2002/02/01 06:35:43  tacyas
28  * Initail Import Into CVS
29  *
30  * Revision 3.0  1998/02/20 05:06:59  brianp
31  * initial rev
32  *
33  */
34
35
36 /*
37  * Windows driver by: Mark E. Peterson (markp@ic.mankato.mn.us)
38  * Updated by Li Wei (liwei@aiar.xjtu.edu.cn)
39  *
40  *
41  ***************************************************************
42  *                     WMesa                                   *
43  *                     version 2.3                             *        
44  *                                                             *
45  *                        By                                   *
46  *                      Li Wei                                 *
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                 *
51  *                                                             *
52  *             July 7th, 1997                                  *
53  ***************************************************************
54  */
55
56
57 #ifndef WMESA_H
58 #define WMESA_H
59
60
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64
65
66 #include <windows.h>
67 #include "gl\gl.h"
68
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 */
78 #endif
79
80 /*
81  * This is the WMesa context 'handle':
82  */
83 typedef struct wmesa_context *WMesaContext;
84
85
86
87 /*
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.
91  *
92  * Input:
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
99  *
100  * Note: Indexed mode requires double buffering under Windows.
101  *
102  * Return:  a WMesa_context or NULL if error.
103  */
104 extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
105                                        GLboolean rgb_flag,GLboolean db_flag);
106
107
108 /*
109  * Destroy a rendering context as returned by WMesaCreateContext()
110  */
111 /*extern void WMesaDestroyContext( WMesaContext ctx );*/
112 extern void WMesaDestroyContext( void );
113
114
115 /*
116  * Make the specified context the current one.
117  */
118 extern void WMesaMakeCurrent( WMesaContext ctx );
119
120
121 /*
122  * Return a handle to the current context.
123  */
124 extern WMesaContext WMesaGetCurrentContext( void );
125
126
127 /*
128  * Swap the front and back buffers for the current context.  No action
129  * taken if the context is not double buffered.
130  */
131 extern void WMesaSwapBuffers(void);
132
133
134 /*
135  * In indexed color mode we need to know when the palette changes.
136  */
137 extern void WMesaPaletteChange(HPALETTE Pal);
138
139 extern void WMesaMove(void);
140
141
142
143 #ifdef __cplusplus
144 }
145 #endif
146
147
148 #endif
149