OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / SGI / util / SGI / include / GL / svgamesa.h
1 /* $Id: svgamesa.h,v 1.1.1.1 2002/02/01 06:30:43 tacyas Exp $ */
2
3 /*
4  * Mesa 3-D graphics library
5  * Version:  2.6
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
23
24 /*
25  * $Log: svgamesa.h,v $
26  * Revision 1.1.1.1  2002/02/01 06:30:43  tacyas
27  * Initail Import Into CVS
28  *
29  * Revision 1.6  1997/12/07 17:28:03  brianp
30  * updated version to 2.6
31  *
32  * Revision 1.5  1997/09/29 23:22:16  brianp
33  * updated version to 2.5
34  *
35  * Revision 1.4  1997/07/11 02:55:24  brianp
36  * added doubleBuffer flag to SVGAMesaCreateContext, bumped version to 2.4
37  *
38  * Revision 1.3  1996/10/30 03:12:47  brianp
39  * incremented version to 2.1
40  *
41  * Revision 1.2  1996/10/15 00:26:02  brianp
42  * added prototype for SVGAMesaSwapBuffers()
43  *
44  * Revision 1.1  1996/09/13 01:26:41  brianp
45  * Initial revision
46  *
47  */
48
49
50
51 /*
52  * SVGA/Mesa interface for Linux.
53  */
54
55
56 /*
57  * Intro to using the VGA/Mesa interface
58  *
59  * 1. #include the <vga.h> file
60  * 2. Call vga_init() to initialize the SVGA library.
61  * 3. Call vga_setmode() to specify the screen size and color depth.
62  * 4. Call SVGAMesaCreateContext() to setup a Mesa context.  If using 8-bit
63  *    color Mesa assumes color index mode, if using 16-bit or deeper color
64  *    Mesa assumes RGB mode.
65  * 5. Call SVGAMesaMakeCurrent() to activate the Mesa context.
66  * 6. You can now use the Mesa API functions.
67  * 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT)
68  *    to restore the original text screen.
69  *
70  * Notes
71  * 1. You must run your executable as root (or use the set UID-bit) because
72  *    the SVGA library requires it.
73  * 2. The SVGA driver is not fully implemented yet.  See svgamesa.c for what
74  *    has to be done yet.
75  */
76
77
78 #ifndef SVGAMESA_H
79 #define SVGAMESA_H
80
81
82 #define SVGAMESA_MAJOR_VERSION 2
83 #define SVGAMESA_MINOR_VERSION 6
84
85
86 #ifdef __cplusplus
87 extern "C" {
88 #endif
89
90
91 #include "GL/gl.h"
92
93
94
95 /*
96  * This is the SVGAMesa context 'handle':
97  */
98 typedef struct svgamesa_context *SVGAMesaContext;
99
100
101
102 /*
103  * doubleBuffer flag new in version 2.4
104  */
105 extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer );
106
107 extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
108
109 extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
110
111 extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
112
113 extern void SVGAMesaSwapBuffers( void );
114
115
116 #ifdef __cplusplus
117 }
118 #endif
119
120
121 #endif