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

  1. /* $Id: gmesa.h,v 1.1 1996/05/22 14:01:29 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: gmesa.h,v $
  26.  * Revision 1.1  1996/05/22  14:01:29  brianp
  27.  * Initial revision
  28.  *
  29.  */
  30.  
  31.  
  32.  
  33. /*
  34.  * (G)eneric Mesa interface
  35.  *
  36.  * This generic interface to Mesa provides minimal functionality.  It's
  37.  * intended to be an _experimental_ interface for projects such as Linux/3-D
  38.  * hardware.  There may eventually be many different implementations of this
  39.  * interface for different operating systems and graphics cards.
  40.  *
  41.  * 
  42.  * Usage:
  43.  *    1. #include <GL/gmesa.h>
  44.  *    2. use GMesaCreateContext() to get a new GMesa context
  45.  *    3. use GMesaMakeCurrent() to activate a GMesa context
  46.  *    4. do your OpenGL rendering
  47.  *    5. use GMesaSwapBuffers() in double buffer mode to swap color buffers
  48.  *    6. use GMesaDestroyContext() to destroy a GMesa context
  49.  *    7. use GMesaGetContext() to return the current context
  50.  *
  51.  *
  52.  * Implementation:
  53.  *    1. GMesaCreateContext() should initialize the hardware and return
  54.  *       a GMesa context struct pointer
  55.  *    2. GMesaMakeCurrent() should activate the context
  56.  *    3. GMesaDestroyContext() should free the context's resources and
  57.  *       reset the hardware
  58.  *    4. GMesaSwapBuffers() should swap the front/back color buffers for
  59.  *       the current context
  60.  *    5. It may be the case that an implementation of this interface only
  61.  *       supports one context at a time.  That's fine.
  62.  */
  63.  
  64.  
  65.  
  66. #ifndef GMESA_H
  67. #define GMESA_H
  68.  
  69.  
  70. #ifdef __cplusplus
  71. extern "C" {
  72. #endif
  73.  
  74.  
  75. /*
  76.  * A version identifier:
  77.  */
  78. #define GMESA_VERSION 1
  79.  
  80.  
  81.  
  82. /*
  83.  * This is the GMesa context 'handle':
  84.  */
  85. typedef struct gmesa_context *GMesaContext;
  86.  
  87.  
  88.  
  89. extern GMesaContext GMesaCreateContext( void );
  90.  
  91. extern void GMesaDestroyContext( GMesaContext ctx );
  92.  
  93. extern void GMesaMakeCurrent( GMesaContext ctx );
  94.  
  95. extern GMesaContext GMesaGetCurrentContext( void );
  96.  
  97. extern GMesaSwapBuffers( void );
  98.  
  99.  
  100.  
  101. #ifdef __cplusplus
  102. }
  103. #endif
  104.  
  105.  
  106. #endif
  107.  
  108.