1 /* $Id: tess.h,v 1.6 1999/09/15 02:12:16 gareth Exp $ */
4 * Mesa 3-D graphics library
7 * Copyright (C) 1999 Brian Paul All Rights Reserved.
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 * Revision 1.6 1999/09/15 02:12:16 gareth
30 * Added debugging pragma message.
32 * Revision 1.5 1999/09/14 22:46:02 gareth
33 * Added debugging output.
35 * Revision 1.4 1999/09/13 22:20:13 gareth
36 * Fixed file headers. Tracking down macro bugs.
40 /*****************************************************************************
42 * GLU 1.3 Polygon Tessellation by Gareth Hughes <garethh@lucent.com>
44 *****************************************************************************/
46 #ifndef __GLU_TESS_H__
47 #define __GLU_TESS_H__
54 #include "tess_typedefs.h"
55 #include "tess_heap.h"
57 #include "tess_grid.h"
64 /*****************************************************************************
65 * The GLUtesselator structure:
66 *****************************************************************************/
69 tess_callbacks_t callbacks
;
70 GLboolean boundary_only
;
75 tess_contour_t
*contours
, *last_contour
;
76 tess_contour_t
*current_contour
;
77 GLdouble mins
[2], maxs
[2];
79 tess_vertex_t
**sorted_vertices
;
81 tess_grid_t
*grid
; /* Not currently used... */
88 /*****************************************************************************
89 * Tessellation error handler:
90 *****************************************************************************/
91 extern void tess_error_callback( GLUtesselator
*, GLenum
, void * );
94 /*****************************************************************************
95 * Debugging output: (to be removed...)
96 *****************************************************************************/
98 extern int tess_debug_level
;
99 int vdebugstr( char *format_str
, ... );
101 #pragma message( "tess: using DEBUGP for debugging output" )
102 #define DEBUGP(level, body) \
104 if ( tess_debug_level >= level ) { \
105 vdebugstr( "%11.11s:%-5d ", __FILE__, __LINE__, level ); \
110 #define DEBUGIF(level) do { if ( tess_debug_level >= level ) {
111 #define DEBUGENDIF } } while ( 0 )
113 #define DEBUGP(level, body)
114 #define DEBUGIF(level) while(0) {
122 #endif /* __GLU_TESS_H__ */