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

  1. /* $Id: dd.c,v 1.5 1996/05/01 15:47:28 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: dd.c,v $
  26.  * Revision 1.5  1996/05/01  15:47:28  brianp
  27.  * added read_depth_span_float() and read_depth_span_int() functions
  28.  *
  29.  * Revision 1.4  1996/04/25  20:55:39  brianp
  30.  * added gl_init_dd_function_table()
  31.  *
  32.  * Revision 1.3  1996/03/26  19:08:44  brianp
  33.  * added gl_dummy_function()
  34.  *
  35.  * Revision 1.2  1995/05/22  21:02:41  brianp
  36.  * Release 1.2
  37.  *
  38.  * Revision 1.1  1995/04/11  14:05:51  brianp
  39.  * Initial revision
  40.  *
  41.  */
  42.  
  43.  
  44. #include <string.h>
  45. #include "dd.h"
  46. #include "depth.h"
  47. #include "macros.h"
  48.  
  49.  
  50. struct dd_function_table DD;
  51.  
  52.  
  53.  
  54. /*
  55.  * This function initializes all the entries in the device driver table.
  56.  * This function is only called by gl_set_context().
  57.  * The actual device driver should then make it's own updates too.
  58.  */
  59. void gl_init_dd_function_table( void )
  60. {
  61.    /* Initialize to all NULL pointers to start */
  62.    MEMSET( &DD, 0, sizeof(struct dd_function_table) );
  63.  
  64.    /*
  65.     * Set up default depth buffer functions.
  66.     * If the device driver has its own depth (Z) buffer then it will
  67.     * override these pointers.
  68.     */
  69.    DD.alloc_depth_buffer = gl_alloc_depth_buffer;
  70.    DD.clear_depth_buffer = gl_clear_depth_buffer;
  71.    DD.depth_test_span = gl_depth_test_span;
  72.    DD.depth_test_pixels = gl_depth_test_pixels;
  73.    DD.read_depth_span_float = gl_read_depth_span_float;
  74.    DD.read_depth_span_int = gl_read_depth_span_int;
  75. }
  76.