Debian Codegraph @

debian/external_deps/fetk/sg/src/gl/depth.h

raw
1 /* $Id: depth.h,v 1.2 2000/10/27 15:21:40 mholst Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 2.0
6 * Copyright (C) 1995-1996 Brian Paul
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 #ifndef DEPTH_H
24 #define DEPTH_H
25
26
27 #include "types.h"
28
29
30 /*
31 * Return the address of the Z-buffer value for window coordinate (x,y):
32 */
33 #define Z_ADDRESS( CTX, X, Y ) \
34 ((CTX)->Buffer->Depth + (CTX)->Buffer->Width * (Y) + (X))
35
36
37
38
39 extern GLuint
40 gl_depth_test_span_generic( GLcontext* ctx, GLuint n, GLint x, GLint y,
41 const GLdepth z[], GLubyte mask[] );
42
43 extern GLuint
44 gl_depth_test_span_less( GLcontext* ctx, GLuint n, GLint x, GLint y,
45 const GLdepth z[], GLubyte mask[] );
46
47 extern GLuint
48 gl_depth_test_span_greater( GLcontext* ctx, GLuint n, GLint x, GLint y,
49 const GLdepth z[], GLubyte mask[] );
50
51
52
53 extern void
54 gl_depth_test_pixels_generic( GLcontext* ctx,
55 GLuint n, const GLint x[], const GLint y[],
56 const GLdepth z[], GLubyte mask[] );
57
58 extern void
59 gl_depth_test_pixels_less( GLcontext* ctx,
60 GLuint n, const GLint x[], const GLint y[],
61 const GLdepth z[], GLubyte mask[] );
62
63 extern void
64 gl_depth_test_pixels_greater( GLcontext* ctx,
65 GLuint n, const GLint x[], const GLint y[],
66 const GLdepth z[], GLubyte mask[] );
67
68
69 extern void gl_read_depth_span_float( GLcontext* ctx,
70 GLuint n, GLint x, GLint y,
71 GLfloat depth[] );
72
73
74 extern void gl_read_depth_span_int( GLcontext* ctx, GLuint n, GLint x, GLint y,
75 GLdepth depth[] );
76
77
78 extern void gl_alloc_depth_buffer( GLcontext* ctx );
79
80
81 extern void gl_clear_depth_buffer( GLcontext* ctx );
82
83
84 extern void gl_ClearDepth( GLcontext* ctx, GLclampd depth );
85 extern void gl_DepthFunc( GLcontext* ctx, GLenum func );
86 extern void gl_DepthMask( GLcontext* ctx, GLboolean flag );
87 extern void gl_DepthRange( GLcontext* ctx, GLclampd nearval, GLclampd farval );
88
89 #endif