1
// Copyright (c) 2013- PPSSPP Project.
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, version 2.0 or later versions.
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU General Public License 2.0 for more details.
12
// A copy of the GPL 2.0 should have been included with the program.
13
// If not, see http://www.gnu.org/licenses/
15
// Official git repository and contact information can be found at
16
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
20
#include "Common/CommonTypes.h"
21
#include "GPU/Math3D.h"
22
#include "GPU/ge_constants.h"
24
// PSP compatible format so we can use the end of the pipeline in beziers etc
35
// We decode all vertices into a common format for easy interpolation and stuff.
36
// Not fast but can be optimized later.
38
SimpleVertex *points[16];
40
// These are used to generate UVs.
44
GEPatchPrimType primType;
49
struct SplinePatchLocal {
50
SimpleVertex **points;
59
GEPatchPrimType primType;
68
void TesselateSplinePatch(u8 *&dest, u16 *indices, int &count, const SplinePatchLocal &spatch, u32 origVertType, int maxVertices);
69
void TesselateBezierPatch(u8 *&dest, u16 *&indices, int &count, int tess_u, int tess_v, const BezierPatch &patch, u32 origVertType, int maxVertices);