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

  1. /* depth.h */
  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: depth.h,v 1.8 1996/05/01 15:47:48 brianp Exp $
  26.  
  27. $Log: depth.h,v $
  28.  * Revision 1.8  1996/05/01  15:47:48  brianp
  29.  * added gl_read_depth_span_int()
  30.  *
  31.  * Revision 1.7  1996/01/12  22:30:38  brianp
  32.  * added Z_ADDRESS() macro
  33.  *
  34.  * Revision 1.6  1995/12/18  17:25:20  brianp
  35.  * use new GLdepth datatype
  36.  *
  37.  * Revision 1.5  1995/06/09  20:20:50  brianp
  38.  * renamed gl_depth_test() as gl_depth_test_span() and return 'passed' count
  39.  *
  40.  * Revision 1.4  1995/05/22  20:59:34  brianp
  41.  * Release 1.2
  42.  *
  43.  * Revision 1.3  1995/03/04  19:25:29  brianp
  44.  * 1.1 beta revision
  45.  *
  46.  * Revision 1.2  1995/02/27  22:48:41  brianp
  47.  * modified for PB
  48.  *
  49.  * Revision 1.1  1995/02/24  14:20:31  brianp
  50.  * Initial revision
  51.  *
  52.  */
  53.  
  54.  
  55. #ifndef DEPTH_H
  56. #define DEPTH_H
  57.  
  58.  
  59.  
  60. #include "GL/gl.h"
  61.  
  62.  
  63. /*
  64.  * Return the address of the Z-buffer value for window coordinate (x,y):
  65.  */
  66. #define Z_ADDRESS( X, Y )  (CC.DepthBuffer + CC.BufferWidth * (Y) + (X))
  67.  
  68.  
  69.  
  70.  
  71. extern GLuint gl_depth_test_span( GLuint n, GLint x, GLint y,
  72.                   const GLdepth z[], GLubyte mask[] );
  73.  
  74.  
  75. extern void gl_depth_test_pixels( GLuint n, const GLint x[], const GLint y[],
  76.                                   const GLdepth z[], GLubyte mask[] );
  77.  
  78.  
  79. extern void gl_read_depth_span_float( GLuint n, GLint x, GLint y,
  80.                                       GLfloat depth[] );
  81.  
  82.  
  83. extern void gl_read_depth_span_int( GLuint n, GLint x, GLint y,
  84.                                     GLdepth depth[] );
  85.  
  86.  
  87. extern void gl_alloc_depth_buffer( void );
  88.  
  89.  
  90. extern void gl_clear_depth_buffer( void );
  91.  
  92.  
  93. #endif
  94.