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

  1. /* vb.c */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  1.2
  6.  * Copyright (C) 1995  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. $Id: vb.c,v 1.5 1995/09/28 19:38:57 brianp Exp $
  26.  
  27. $Log: vb.c,v $
  28.  * Revision 1.5  1995/09/28  19:38:57  brianp
  29.  * replaced ClipFlag[] with Unclipped[]
  30.  *
  31.  * Revision 1.4  1995/09/25  19:24:54  brianp
  32.  * added code to initialize VB.MaterialMask and VB.MaterialChanges
  33.  *
  34.  * Revision 1.3  1995/09/07  14:17:08  brianp
  35.  * new gl_init_vb() function
  36.  *
  37.  * Revision 1.2  1995/05/22  21:02:41  brianp
  38.  * Release 1.2
  39.  *
  40.  * Revision 1.1  1995/03/24  15:31:44  brianp
  41.  * Initial revision
  42.  *
  43.  */
  44.  
  45.  
  46. #include "vb.h"
  47.  
  48.  
  49.  
  50. /*
  51.  * Vertex buffer:  this data structure holds all the per-vertex data
  52.  * need to construct and render points, lines, and polygons.
  53.  */
  54.  
  55.  
  56. struct vertex_buffer VB;
  57.  
  58.  
  59.  
  60. /*
  61.  * Initialize the vertex buffer.  Only needs to be done once.
  62.  */
  63. void gl_init_vb( void )
  64. {
  65.    GLuint i;
  66.  
  67.    for (i=0;i<VB_SIZE;i++) {
  68.       VB.Unclipped[i] = 1;
  69.       VB.MaterialMask[i] = 0;
  70.    }
  71.    VB.MaterialChanges = GL_FALSE;
  72. }
  73.  
  74.