Correct bezier handling for 0 division.

This should still be drawn and treated as 1.
This commit is contained in:
Unknown W. Brackets committed 2016-04-10 17:53:50 -07:00
1 parent 0cd44e838b
commit 9224eb375f
1 file changed
+8
+8
View File
@@ -960,6 +960,14 @@ void DrawEngineCommon::SubmitBezier(const void *control_points, const void *indi
// We shouldn't really split up into separate 4x4 patches, instead we should do something that works
// like the splines, so we subdivide across the whole "mega-patch".
// If specified as 0, uses 1.
if (tess_u < 1) {
tess_u = 1;
}
if (tess_v < 1) {
tess_v = 1;
}
u16 *inds = quadIndices_;
int maxVertices = SPLINE_BUFFER_SIZE / vertexSize;
for (int patch_idx = 0; patch_idx < num_patches_u*num_patches_v; ++patch_idx) {