xref: /reactos/dll/opengl/mesa/clip.h (revision 5f2bebf7)
1*5f2bebf7SJérôme Gardou /* $Id: clip.h,v 1.3 1998/02/03 23:45:36 brianp Exp $ */
2*5f2bebf7SJérôme Gardou 
3*5f2bebf7SJérôme Gardou /*
4*5f2bebf7SJérôme Gardou  * Mesa 3-D graphics library
5*5f2bebf7SJérôme Gardou  * Version:  2.6
6*5f2bebf7SJérôme Gardou  * Copyright (C) 1995-1996  Brian Paul
7*5f2bebf7SJérôme Gardou  *
8*5f2bebf7SJérôme Gardou  * This library is free software; you can redistribute it and/or
9*5f2bebf7SJérôme Gardou  * modify it under the terms of the GNU Library General Public
10*5f2bebf7SJérôme Gardou  * License as published by the Free Software Foundation; either
11*5f2bebf7SJérôme Gardou  * version 2 of the License, or (at your option) any later version.
12*5f2bebf7SJérôme Gardou  *
13*5f2bebf7SJérôme Gardou  * This library is distributed in the hope that it will be useful,
14*5f2bebf7SJérôme Gardou  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15*5f2bebf7SJérôme Gardou  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16*5f2bebf7SJérôme Gardou  * Library General Public License for more details.
17*5f2bebf7SJérôme Gardou  *
18*5f2bebf7SJérôme Gardou  * You should have received a copy of the GNU Library General Public
19*5f2bebf7SJérôme Gardou  * License along with this library; if not, write to the Free
20*5f2bebf7SJérôme Gardou  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21*5f2bebf7SJérôme Gardou  */
22*5f2bebf7SJérôme Gardou 
23*5f2bebf7SJérôme Gardou 
24*5f2bebf7SJérôme Gardou /*
25*5f2bebf7SJérôme Gardou  * $Log: clip.h,v $
26*5f2bebf7SJérôme Gardou  * Revision 1.3  1998/02/03 23:45:36  brianp
27*5f2bebf7SJérôme Gardou  * added space parameter to clip interpolation functions
28*5f2bebf7SJérôme Gardou  *
29*5f2bebf7SJérôme Gardou  * Revision 1.2  1998/01/06 02:40:52  brianp
30*5f2bebf7SJérôme Gardou  * added DavidB's clipping interpolation optimization
31*5f2bebf7SJérôme Gardou  *
32*5f2bebf7SJérôme Gardou  * Revision 1.1  1996/09/13 01:38:16  brianp
33*5f2bebf7SJérôme Gardou  * Initial revision
34*5f2bebf7SJérôme Gardou  *
35*5f2bebf7SJérôme Gardou  */
36*5f2bebf7SJérôme Gardou 
37*5f2bebf7SJérôme Gardou 
38*5f2bebf7SJérôme Gardou #ifndef CLIP_H
39*5f2bebf7SJérôme Gardou #define CLIP_H
40*5f2bebf7SJérôme Gardou 
41*5f2bebf7SJérôme Gardou 
42*5f2bebf7SJérôme Gardou #include "types.h"
43*5f2bebf7SJérôme Gardou 
44*5f2bebf7SJérôme Gardou 
45*5f2bebf7SJérôme Gardou 
46*5f2bebf7SJérôme Gardou #ifdef DEBUG
47*5f2bebf7SJérôme Gardou #  define GL_VIEWCLIP_POINT( V )   gl_viewclip_point( V )
48*5f2bebf7SJérôme Gardou #else
49*5f2bebf7SJérôme Gardou #  define GL_VIEWCLIP_POINT( V )			\
50*5f2bebf7SJérôme Gardou      (    (V)[0] <= (V)[3] && (V)[0] >= -(V)[3]		\
51*5f2bebf7SJérôme Gardou        && (V)[1] <= (V)[3] && (V)[1] >= -(V)[3]		\
52*5f2bebf7SJérôme Gardou        && (V)[2] <= (V)[3] && (V)[2] >= -(V)[3] )
53*5f2bebf7SJérôme Gardou #endif
54*5f2bebf7SJérôme Gardou 
55*5f2bebf7SJérôme Gardou 
56*5f2bebf7SJérôme Gardou 
57*5f2bebf7SJérôme Gardou 
58*5f2bebf7SJérôme Gardou extern GLuint gl_viewclip_point( const GLfloat v[] );
59*5f2bebf7SJérôme Gardou 
60*5f2bebf7SJérôme Gardou extern GLuint gl_viewclip_line( GLcontext* ctx, GLuint *i, GLuint *j );
61*5f2bebf7SJérôme Gardou 
62*5f2bebf7SJérôme Gardou extern GLuint gl_viewclip_polygon( GLcontext* ctx, GLuint n, GLuint vlist[] );
63*5f2bebf7SJérôme Gardou 
64*5f2bebf7SJérôme Gardou 
65*5f2bebf7SJérôme Gardou 
66*5f2bebf7SJérôme Gardou extern GLuint gl_userclip_point( GLcontext* ctx, const GLfloat v[] );
67*5f2bebf7SJérôme Gardou 
68*5f2bebf7SJérôme Gardou extern GLuint gl_userclip_line( GLcontext* ctx, GLuint *i, GLuint *j );
69*5f2bebf7SJérôme Gardou 
70*5f2bebf7SJérôme Gardou extern GLuint gl_userclip_polygon( GLcontext* ctx, GLuint n, GLuint vlist[] );
71*5f2bebf7SJérôme Gardou 
72*5f2bebf7SJérôme Gardou 
73*5f2bebf7SJérôme Gardou extern void gl_ClipPlane( GLcontext* ctx,
74*5f2bebf7SJérôme Gardou                           GLenum plane, const GLfloat *equation );
75*5f2bebf7SJérôme Gardou 
76*5f2bebf7SJérôme Gardou extern void gl_GetClipPlane( GLcontext* ctx,
77*5f2bebf7SJérôme Gardou                              GLenum plane, GLdouble *equation );
78*5f2bebf7SJérôme Gardou 
79*5f2bebf7SJérôme Gardou 
80*5f2bebf7SJérôme Gardou /*
81*5f2bebf7SJérôme Gardou  * Clipping interpolation functions
82*5f2bebf7SJérôme Gardou  */
83*5f2bebf7SJérôme Gardou 
84*5f2bebf7SJérôme Gardou extern void interpolate_aux( GLcontext *ctx, GLuint space,
85*5f2bebf7SJérôme Gardou                              GLuint dst, GLfloat t, GLuint in, GLuint out );
86*5f2bebf7SJérôme Gardou 
87*5f2bebf7SJérôme Gardou extern void interpolate_aux_color_tex2( GLcontext *ctx,	GLuint space,
88*5f2bebf7SJérôme Gardou                              GLuint dst, GLfloat t, GLuint in, GLuint out );
89*5f2bebf7SJérôme Gardou 
90*5f2bebf7SJérôme Gardou extern void interpolate_aux_tex2( GLcontext *ctx, GLuint space,
91*5f2bebf7SJérôme Gardou                              GLuint dst, GLfloat t, GLuint in, GLuint out );
92*5f2bebf7SJérôme Gardou 
93*5f2bebf7SJérôme Gardou extern void interpolate_aux_color( GLcontext *ctx, GLuint space,
94*5f2bebf7SJérôme Gardou                              GLuint dst, GLfloat t, GLuint in, GLuint out );
95*5f2bebf7SJérôme Gardou 
96*5f2bebf7SJérôme Gardou 
97*5f2bebf7SJérôme Gardou #endif
98*5f2bebf7SJérôme Gardou 
99