home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / mesa-1.2.8 / include / mondello / cmesa.h < prev    next >
C/C++ Source or Header  |  1996-05-27  |  2KB  |  95 lines

  1. /* $Id: svgamesa.h,v 1.1 1996/01/16 15:17:00 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  1.2
  6.  * Copyright (C) 1995-1996  Brian Paul  (brianp@ssec.wisc.edu)
  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.1  1996/01/16  15:17:00  brianp
  27.  * Initial revision
  28.  *
  29.  */
  30.  
  31.  
  32.  
  33. /*
  34.  * SVGAMesa
  35.  *
  36.  * SVGA/Mesa interface for Linux.
  37.  */
  38.  
  39.  
  40. /*
  41.  * Intro to using the VGA/Mesa interface
  42.  *
  43.  * 1. #include the <vga.h> file
  44.  * 2. Call vga_init() to initialize the SVGA library.
  45.  * 3. Call vga_setmode() to specify the screen size and color depth.
  46.  * 4. Call SVGAMesaCreateContext() to setup a Mesa context.  If using 8-bit
  47.  *    color Mesa assumes color index mode, if using 16-bit or deeper color
  48.  *    Mesa assumes RGB mode.
  49.  * 5. Call SVGAMesaMakeCurrent() to activate the Mesa context.
  50.  * 6. You can now use the Mesa API functions.
  51.  * 7. Before exiting, call SVGAMesaDestroyContext() then vga_setmode(TEXT)
  52.  *    to restore the original text screen.
  53.  *
  54.  * Notes
  55.  * 1. You must run your executable as root (or use the set UID-bit) because
  56.  *    the SVGA library requires it.
  57.  * 2. The SVGA driver is not fully implemented yet.  See svgamesa.c for what
  58.  *    has to be done yet.
  59.  */
  60.  
  61.  
  62. #ifndef CMESA_H
  63. #define CMESA_H
  64.  
  65.  
  66. #ifdef __cplusplus
  67. extern "C" {
  68. #endif
  69.  
  70.  
  71. /*
  72.  * This is the SVGAMesa context 'handle':
  73.  */
  74. typedef struct clgd547x_mesa_context *clgd547xMesaContext;
  75.  
  76.  
  77.  
  78. extern clgd547xMesaContext clgd547xMesaCreateContext( void );
  79.  
  80. extern void clgd547xMesaDestroyContext( clgd547xMesaContext ctx );
  81.  
  82. extern void clgd547xMesaMakeCurrent( clgd547xMesaContext ctx );
  83.  
  84. extern clgd547xMesaContext clgd547xMesaGetCurrentContext( void );
  85.  
  86.  
  87.  
  88. #ifdef __cplusplus
  89. }
  90. #endif
  91.  
  92.  
  93. #endif
  94.  
  95.