X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=curves.c;fp=curves.c;h=f0b8b293a80857233bd024b1a340d89cfd15a855;hb=e40a37e7e99114e259dffe2e36416f0c238a6b40;hp=de4e89c7d70cef5b1ee40fe67191ccdb72f12f5f;hpb=6f4bdacc137d137d64882beb27d6dc0091de0f0e;p=xonotic%2Fdarkplaces.git diff --git a/curves.c b/curves.c index de4e89c7..f0b8b293 100644 --- a/curves.c +++ b/curves.c @@ -167,13 +167,13 @@ int Q3PatchTesselationOnY(int patchwidth, int patchheight, int components, const // (such as those produced by Q3PatchTesselate) // (note: width and height are the actual vertex size, this produces // (width-1)*(height-1)*2 triangles, 3 elements each) -void Q3PatchTriangleElements(int *elements, int width, int height) +void Q3PatchTriangleElements(int *elements, int width, int height, int firstvertex) { int x, y, row0, row1; for (y = 0;y < height - 1;y++) { - row0 = (y + 0) * width; - row1 = (y + 1) * width; + row0 = firstvertex + (y + 0) * width; + row1 = firstvertex + (y + 1) * width; for (x = 0;x < width - 1;x++) { *elements++ = row0;