1 /* $Id: svgamesa.h,v 1.1.1.1 2002/02/01 06:35:43 tacyas Exp $ */
4 * Mesa 3-D graphics library
6 * Copyright (C) 1995-1998 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 * $Log: svgamesa.h,v $
26 * Revision 1.1.1.1 2002/02/01 06:35:43 tacyas
27 * Initail Import Into CVS
29 * Revision 3.0 1998/02/20 05:07:24 brianp
37 * SVGA/Mesa interface for Linux.
42 * Intro to using the VGA/Mesa interface
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.
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
67 #define SVGAMESA_MAJOR_VERSION 3
68 #define SVGAMESA_MINOR_VERSION 0
81 * This is the SVGAMesa context 'handle':
83 typedef struct svgamesa_context *SVGAMesaContext;
88 * doubleBuffer flag new in version 2.4
90 extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer );
92 extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
94 extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
96 extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
98 extern void SVGAMesaSwapBuffers( void );