1 /* $Id: svgamesa.h,v 1.4 2000/02/09 19:03:28 brianp Exp $ */
4 * Mesa 3-D graphics library
6 * Copyright (C) 1995-2000 Brian Paul
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.
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.
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.
25 * SVGA/Mesa interface for Linux.
30 * Intro to using the VGA/Mesa interface
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.
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
55 #define SVGAMESA_MAJOR_VERSION 3
56 #define SVGAMESA_MINOR_VERSION 3
69 * This is the SVGAMesa context 'handle':
71 typedef struct svgamesa_context *SVGAMesaContext;
76 * doubleBuffer flag new in version 2.4
78 extern int SVGAMesaInit( int GraphMode );
80 extern int SVGAMesaClose( void );
82 extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer );
84 extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
86 extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
88 extern void SVGAMesaSwapBuffers( void );
90 extern void SVGAMesaSetCI(int ndx, GLubyte red, GLubyte green, GLubyte blue);
92 extern SVGAMesaContext SVGAMesaGetCurrentContext( void );