Debian Codegraph @

debian/external_deps/fetk/sg/src/gl/GL/wmesa.h

raw
1 /* $Id: wmesa.h,v 1.2 2000/11/01 22:18:00 mholst Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 2.2
6 * Copyright (C) 1995-1997 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 * Windows driver by: Mark E. Peterson ([email protected])
23 * Updated by Li Wei ([email protected])
24 *
25 */
26
27 #ifndef WMESA_H
28 #define WMESA_H
29
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35
36 #include <windows.h>
37 #include "gl\gl.h"
38
39
40 /*
41 * This is the WMesa context 'handle':
42 */
43 typedef struct wmesa_context *WMesaContext;
44
45
46
47 /*
48 * Create a new WMesaContext for rendering into a window. You must
49 * have already created the window of correct visual type and with an
50 * appropriate colormap.
51 *
52 * Input:
53 * hWnd - Window handle
54 * Pal - Palette to use
55 * rgb_flag - GL_TRUE = RGB mode,
56 * GL_FALSE = color index mode
57 * db_flag - GL_TRUE = double-buffered,
58 * GL_FALSE = single buffered
59 *
60 * Note: Indexed mode requires double buffering under Windows.
61 *
62 * Return: a WMesa_context or NULL if error.
63 */
64 extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE Pal,
65 GLboolean rgb_flag,GLboolean db_flag);
66
67
68 /*
69 * Destroy a rendering context as returned by WMesaCreateContext()
70 */
71 /*extern void WMesaDestroyContext( WMesaContext ctx );*/
72 extern void WMesaDestroyContext( void );
73
74
75 /*
76 * Make the specified context the current one.
77 */
78 extern void WMesaMakeCurrent( WMesaContext ctx );
79
80
81 /*
82 * Return a handle to the current context.
83 */
84 extern WMesaContext WMesaGetCurrentContext( void );
85
86
87 /*
88 * Swap the front and back buffers for the current context. No action
89 * taken if the context is not double buffered.
90 */
91 extern void WMesaSwapBuffers(void);
92
93
94 /*
95 * In indexed color mode we need to know when the palette changes.
96 */
97 extern void WMesaPaletteChange(HPALETTE Pal);
98
99
100
101 #ifdef __cplusplus
102 }
103 #endif
104
105
106 #endif
107