/* * $Id: hclip.c 228 2007-12-01 02:32:26Z HansR $ * * $Date: 2007-11-30 21:32:26$ * $Revision: 228 $ * * (C) 1999 by Hyperion * All rights reserved * * This file is part of the MiniGL library project * See the file Licence.txt for more details * */ #ifndef __HCLIP_H__ #define __HCLIP_H__ GLboolean hc_LineClip(GLcontext context, uint32 *pts); typedef enum hc_DrawPolyFlags { HCDRAW_DO_POLYOFFSET = 1<<0, HCDRAW_FLATSHADE_LASTVTX = 1<<1 // Use the last vertex for flat shading } DrawPolyFlags_t; void hc_ClipAndDrawPoly(GLcontext context, MGLPolygon *poly, GLuint or_codes, DrawPolyFlags_t flags); /** Clips a polygon and outputs the resulting (clipped) polygon to outputPoly. */ extern GLboolean hc_ClipPoly(GLcontext context, MGLPolygon *poly, GLuint or_codes, MGLPolygon **outputPoly, MGLPolygon *temp); void hc_ClipAndDrawPolyFF(GLcontext context, MGLPolygon *poly, GLuint or_codes, DrawPolyFlags_t flags); /** Clips a polygon and outputs the resulting (clipped) polygon to outputPoly. */ extern GLboolean hc_ClipPolyFF(GLcontext context, MGLPolygon *poly, GLuint or_codes, MGLPolygon **outputPoly, MGLPolygon *temp); #endif