2 * Mesa 3-D graphics library
4 * Copyright (C) 1995-2001 Brian Paul
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the Free
18 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 * SVGA/Mesa interface for Linux.
28 * Intro to using the VGA/Mesa interface
30 * 1. #include the <vga.h> file
31 * 2. Call vga_init() to initialize the SVGA library.
32 * 3. Call vga_setmode() to specify the screen size and color depth.
33 * 4. Call SVGAMesaCreateContext() to setup a Mesa context. If using 8-bit
34 * color Mesa assumes color index mode, if using 16-bit or deeper color
35 * Mesa assumes RGB mode.
36 * 5. Call SVGAMesaMakeCurrent() to activate the Mesa context.
37 * 6. You can now use the Mesa API functions.
38 * 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT)
39 * to restore the original text screen.
42 * 1. You must run your executable as root (or use the set UID-bit) because
43 * the SVGA library requires it.
44 * 2. The SVGA driver is not fully implemented yet. See svgamesa.c for what
53 #define SVGAMESA_MAJOR_VERSION 4
54 #define SVGAMESA_MINOR_VERSION 0
67 * This is the SVGAMesa context 'handle':
69 typedef struct svgamesa_context
*SVGAMesaContext
;
74 * doubleBuffer flag new in version 2.4
76 extern int SVGAMesaInit( int GraphMode
);
78 extern int SVGAMesaClose( void );
80 extern SVGAMesaContext
SVGAMesaCreateContext( GLboolean doubleBuffer
);
82 extern void SVGAMesaDestroyContext( SVGAMesaContext ctx
);
84 extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx
);
86 extern void SVGAMesaSwapBuffers( void );
88 extern void SVGAMesaSetCI(int ndx
, GLubyte red
, GLubyte green
, GLubyte blue
);
90 extern SVGAMesaContext
SVGAMesaGetCurrentContext( void );