OSDN Git Service

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