]> git.jsancho.org Git - lugaru.git/blob - Dependencies/OpenGL/GL/svgamesa.h
Restored old OpenGL headers; hopefully this makes it work on MSVC
[lugaru.git] / Dependencies / OpenGL / GL / svgamesa.h
1 /* $Id: svgamesa.h,v 1.4 2000/02/09 19:03:28 brianp Exp $ */
2
3 /*
4  * Mesa 3-D graphics library
5  * Version:  3.3
6  * Copyright (C) 1995-2000  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  * SVGA/Mesa interface for Linux.
26  */
27
28
29 /*
30  * Intro to using the VGA/Mesa interface
31  *
32  * 1. #include the <vga.h> file
33  * 2. Call vga_init() to initialize the SVGA library.
34  * 3. Call vga_setmode() to specify the screen size and color depth.
35  * 4. Call SVGAMesaCreateContext() to setup a Mesa context.  If using 8-bit
36  *    color Mesa assumes color index mode, if using 16-bit or deeper color
37  *    Mesa assumes RGB mode.
38  * 5. Call SVGAMesaMakeCurrent() to activate the Mesa context.
39  * 6. You can now use the Mesa API functions.
40  * 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT)
41  *    to restore the original text screen.
42  *
43  * Notes
44  * 1. You must run your executable as root (or use the set UID-bit) because
45  *    the SVGA library requires it.
46  * 2. The SVGA driver is not fully implemented yet.  See svgamesa.c for what
47  *    has to be done yet.
48  */
49
50
51 #ifndef SVGAMESA_H
52 #define SVGAMESA_H
53
54
55 #define SVGAMESA_MAJOR_VERSION 3
56 #define SVGAMESA_MINOR_VERSION 3
57
58
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62
63
64 #include "GL/gl.h"
65
66
67
68 /*
69  * This is the SVGAMesa context 'handle':
70  */
71 typedef struct svgamesa_context *SVGAMesaContext;
72
73
74
75 /*
76  * doubleBuffer flag new in version 2.4
77  */
78 extern int SVGAMesaInit( int GraphMode );
79
80 extern int SVGAMesaClose( void );
81
82 extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer );
83
84 extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
85
86 extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
87
88 extern void SVGAMesaSwapBuffers( void );
89
90 extern void SVGAMesaSetCI(int ndx, GLubyte red, GLubyte green, GLubyte blue);
91
92 extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
93
94 #ifdef __cplusplus
95 }
96 #endif
97
98
99 #endif
100