Moved glcore.h to a location prefixed by 'GL/internal', for compatibility
[mesa.git] / include / GL / wmesa.h
1 /* $Id: wmesa.h,v 1.1 1999/08/19 00:55:40 jtg 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 1999/08/19 00:55:40 jtg
28 * Initial revision
29 *
30 * Revision 3.2 1999/01/03 02:54:45 brianp
31 * updated per Ted Jump
32 *
33 * Revision 3.1 1998/12/01 02:34:27 brianp
34 * applied Mark Kilgard's patches from November 30, 1998
35 *
36 * Revision 3.0 1998/02/20 05:06:59 brianp
37 * initial rev
38 *
39 */
40
41
42 /*
43 * Windows driver by: Mark E. Peterson (markp@ic.mankato.mn.us)
44 * Updated by Li Wei (liwei@aiar.xjtu.edu.cn)
45 *
46 *
47 ***************************************************************
48 * WMesa *
49 * version 2.3 *
50 * *
51 * By *
52 * Li Wei *
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 *
57 * *
58 * July 7th, 1997 *
59 ***************************************************************
60 */
61
62
63 #ifndef WMESA_H
64 #define WMESA_H
65
66
67 #ifdef __cplusplus
68 extern "C" {
69 #endif
70
71
72 #include "gl\gl.h"
73
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 */
83 #endif
84
85 /*
86 * This is the WMesa context 'handle':
87 */
88 typedef struct wmesa_context *WMesaContext;
89
90
91
92 /*
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.
96 *
97 * Input:
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
104 *
105 * Note: Indexed mode requires double buffering under Windows.
106 *
107 * Return: a WMesa_context or NULL if error.
108 */
109 extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
110 GLboolean rgb_flag,GLboolean db_flag);
111
112
113 /*
114 * Destroy a rendering context as returned by WMesaCreateContext()
115 */
116 /*extern void WMesaDestroyContext( WMesaContext ctx );*/
117 extern void WMesaDestroyContext( void );
118
119
120
121 /*
122 * Make the specified context the current one.
123 */
124 extern void WMesaMakeCurrent( WMesaContext ctx );
125
126
127 /*
128 * Return a handle to the current context.
129 */
130 extern WMesaContext WMesaGetCurrentContext( void );
131
132
133 /*
134 * Swap the front and back buffers for the current context. No action
135 * taken if the context is not double buffered.
136 */
137 extern void WMesaSwapBuffers(void);
138
139
140 /*
141 * In indexed color mode we need to know when the palette changes.
142 */
143 extern void WMesaPaletteChange(HPALETTE Pal);
144
145 extern void WMesaMove(void);
146
147
148
149 #ifdef __cplusplus
150 }
151 #endif
152
153
154 #endif
155