6 // to expand a 5x5 patch to 21x21 vertices (4x4 tesselation), one might use this call:
7 // Q3PatchSubdivideFloat(3, sizeof(float[3]), outvertices, 5, 5, sizeof(float[3]), patchvertices, 4, 4);
8 void Q3PatchTesselateFloat(int numcomponents, int outputstride, float *outputvertices, int patchwidth, int patchheight, int inputstride, float *patchvertices, int tesselationwidth, int tesselationheight);
9 // returns how much tesselation of each segment is needed to remain under tolerance
10 int Q3PatchTesselationOnX(int patchwidth, int patchheight, int components, const float *in, float tolerance);
11 // returns how much tesselation of each segment is needed to remain under tolerance
12 int Q3PatchTesselationOnY(int patchwidth, int patchheight, int components, const float *in, float tolerance);
13 // calculates elements for a grid of vertices
14 // (such as those produced by Q3PatchTesselate)
15 // (note: width and height are the actual vertex size, this produces
16 // (width-1)*(height-1)*2 triangles, 3 elements each)
17 void Q3PatchTriangleElements(int *elements, int width, int height, int firstvertex);