home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 5 / MA_Cover_5.iso / ppc / mesa / include / gl / svgamesa.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-31  |  2.8 KB  |  116 lines

  1. /* $Id: svgamesa.h,v 1.5 1997/09/29 23:22:16 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  2.5
  6.  * Copyright (C) 1995-1997  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.5  1997/09/29 23:22:16  brianp
  27.  * updated version to 2.5
  28.  *
  29.  * Revision 1.4  1997/07/11 02:55:24  brianp
  30.  * added doubleBuffer flag to SVGAMesaCreateContext, bumped version to 2.4
  31.  *
  32.  * Revision 1.3  1996/10/30 03:12:47  brianp
  33.  * incremented version to 2.1
  34.  *
  35.  * Revision 1.2  1996/10/15 00:26:02  brianp
  36.  * added prototype for SVGAMesaSwapBuffers()
  37.  *
  38.  * Revision 1.1  1996/09/13 01:26:41  brianp
  39.  * Initial revision
  40.  *
  41.  */
  42.  
  43.  
  44.  
  45. /*
  46.  * SVGA/Mesa interface for Linux.
  47.  */
  48.  
  49.  
  50. /*
  51.  * Intro to using the VGA/Mesa interface
  52.  *
  53.  * 1. #include the <vga.h> file
  54.  * 2. Call vga_init() to initialize the SVGA library.
  55.  * 3. Call vga_setmode() to specify the screen size and color depth.
  56.  * 4. Call SVGAMesaCreateContext() to setup a Mesa context.  If using 8-bit
  57.  *    color Mesa assumes color index mode, if using 16-bit or deeper color
  58.  *    Mesa assumes RGB mode.
  59.  * 5. Call SVGAMesaMakeCurrent() to activate the Mesa context.
  60.  * 6. You can now use the Mesa API functions.
  61.  * 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT)
  62.  *    to restore the original text screen.
  63.  *
  64.  * Notes
  65.  * 1. You must run your executable as root (or use the set UID-bit) because
  66.  *    the SVGA library requires it.
  67.  * 2. The SVGA driver is not fully implemented yet.  See svgamesa.c for what
  68.  *    has to be done yet.
  69.  */
  70.  
  71.  
  72. #ifndef SVGAMESA_H
  73. #define SVGAMESA_H
  74.  
  75.  
  76. #define SVGAMESA_MAJOR_VERSION 2
  77. #define SVGAMESA_MINOR_VERSION 5
  78.  
  79.  
  80. #ifdef __cplusplus
  81. extern "C" {
  82. #endif
  83.  
  84.  
  85. #include "GL/gl.h"
  86.  
  87.  
  88.  
  89. /*
  90.  * This is the SVGAMesa context 'handle':
  91.  */
  92. typedef struct svgamesa_context *SVGAMesaContext;
  93.  
  94.  
  95.  
  96. /*
  97.  * doubleBuffer flag new in version 2.4
  98.  */
  99. extern SVGAMesaContext SVGAMesaCreateContext( GLboolean doubleBuffer );
  100.  
  101. extern void SVGAMesaDestroyContext( SVGAMesaContext ctx );
  102.  
  103. extern void SVGAMesaMakeCurrent( SVGAMesaContext ctx );
  104.  
  105. extern SVGAMesaContext SVGAMesaGetCurrentContext( void );
  106.  
  107. extern void SVGAMesaSwapBuffers( void );
  108.  
  109.  
  110. #ifdef __cplusplus
  111. }
  112. #endif
  113.  
  114.  
  115. #endif
  116.