1 /* $Id: depth.h,v 1.2 1996/09/15 14:19:16 brianp Exp $ */
4 * Mesa 3-D graphics library
6 * Copyright (C) 1995-1996 Brian Paul
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.
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.
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.
26 * Revision 1.2 1996/09/15 14:19:16 brianp
27 * now use GLframebuffer and GLvisual
29 * Revision 1.1 1996/09/13 01:38:16 brianp
43 * Return the address of the Z-buffer value for window coordinate (x,y):
45 #define Z_ADDRESS( CTX, X, Y ) \
46 ((CTX)->Buffer->Depth + (CTX)->Buffer->Width * (Y) + (X))
52 gl_depth_test_span_generic( GLcontext
* ctx
, GLuint n
, GLint x
, GLint y
,
53 const GLdepth z
[], GLubyte mask
[] );
56 gl_depth_test_span_less( GLcontext
* ctx
, GLuint n
, GLint x
, GLint y
,
57 const GLdepth z
[], GLubyte mask
[] );
60 gl_depth_test_span_greater( GLcontext
* ctx
, GLuint n
, GLint x
, GLint y
,
61 const GLdepth z
[], GLubyte mask
[] );
66 gl_depth_test_pixels_generic( GLcontext
* ctx
,
67 GLuint n
, const GLint x
[], const GLint y
[],
68 const GLdepth z
[], GLubyte mask
[] );
71 gl_depth_test_pixels_less( GLcontext
* ctx
,
72 GLuint n
, const GLint x
[], const GLint y
[],
73 const GLdepth z
[], GLubyte mask
[] );
76 gl_depth_test_pixels_greater( GLcontext
* ctx
,
77 GLuint n
, const GLint x
[], const GLint y
[],
78 const GLdepth z
[], GLubyte mask
[] );
81 extern void gl_read_depth_span_float( GLcontext
* ctx
,
82 GLuint n
, GLint x
, GLint y
,
86 extern void gl_read_depth_span_int( GLcontext
* ctx
, GLuint n
, GLint x
, GLint y
,
90 extern void gl_alloc_depth_buffer( GLcontext
* ctx
);
93 extern void gl_clear_depth_buffer( GLcontext
* ctx
);
96 extern void gl_ClearDepth( GLcontext
* ctx
, GLclampd depth
);
97 extern void gl_DepthFunc( GLcontext
* ctx
, GLenum func
);
98 extern void gl_DepthMask( GLcontext
* ctx
, GLboolean flag
);
99 extern void gl_DepthRange( GLcontext
* ctx
, GLclampd nearval
, GLclampd farval
);