2 /* $Id: depth.h,v 1.2 1999/10/08 09:27:10 keithw Exp $ */
5 * Mesa 3-D graphics library
8 * Copyright (C) 1999 Brian Paul All Rights Reserved.
10 * Permission is hereby granted, free of charge, to any person obtaining a
11 * copy of this software and associated documentation files (the "Software"),
12 * to deal in the Software without restriction, including without limitation
13 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 * and/or sell copies of the Software, and to permit persons to whom the
15 * Software is furnished to do so, subject to the following conditions:
17 * The above copyright notice and this permission notice shall be included
18 * in all copies or substantial portions of the Software.
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
24 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
40 * Return the address of the Z-buffer value for window coordinate (x,y):
42 #define Z_ADDRESS( CTX, X, Y ) \
43 ((CTX)->Buffer->Depth + (CTX)->Buffer->Width * (Y) + (X))
49 gl_depth_test_span_generic( GLcontext
* ctx
, GLuint n
, GLint x
, GLint y
,
50 const GLdepth z
[], GLubyte mask
[] );
53 gl_depth_test_span_less( GLcontext
* ctx
, GLuint n
, GLint x
, GLint y
,
54 const GLdepth z
[], GLubyte mask
[] );
57 gl_depth_test_span_greater( GLcontext
* ctx
, GLuint n
, GLint x
, GLint y
,
58 const GLdepth z
[], GLubyte mask
[] );
63 gl_depth_test_pixels_generic( GLcontext
* ctx
,
64 GLuint n
, const GLint x
[], const GLint y
[],
65 const GLdepth z
[], GLubyte mask
[] );
68 gl_depth_test_pixels_less( GLcontext
* ctx
,
69 GLuint n
, const GLint x
[], const GLint y
[],
70 const GLdepth z
[], GLubyte mask
[] );
73 gl_depth_test_pixels_greater( GLcontext
* ctx
,
74 GLuint n
, const GLint x
[], const GLint y
[],
75 const GLdepth z
[], GLubyte mask
[] );
78 extern void gl_read_depth_span_float( GLcontext
* ctx
,
79 GLuint n
, GLint x
, GLint y
,
83 extern void gl_read_depth_span_int( GLcontext
* ctx
, GLuint n
, GLint x
, GLint y
,
87 extern void gl_alloc_depth_buffer( GLcontext
* ctx
);
90 extern void gl_clear_depth_buffer( GLcontext
* ctx
);
93 extern void gl_ClearDepth( GLcontext
* ctx
, GLclampd depth
);
95 extern void gl_DepthFunc( GLcontext
* ctx
, GLenum func
);
97 extern void gl_DepthMask( GLcontext
* ctx
, GLboolean flag
);