From 62195753a9308d82054aaaa7639fb2031e5a251a Mon Sep 17 00:00:00 2001 From: David G Yu Date: Mon, 17 Jun 2019 17:33:40 -0700 Subject: [PATCH] Updated default options for examples Changed several default options in the example viewers to the preferred settings for improved shape fidelity and to improve consistency between the different viewers: - enabled smooth corner, and inf sharp patch options by default - disabled screenspace tess and fractional tess by default - changed the default approximation to Gregory in the mtlViewer --- examples/dxViewer/dxviewer.cpp | 10 +++++----- examples/glEvalLimit/glEvalLimit.cpp | 4 ++-- examples/glStencilViewer/glStencilViewer.cpp | 2 +- examples/glViewer/glViewer.cpp | 4 ++-- examples/mtlViewer/mtlViewer.mm | 9 +++++---- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/examples/dxViewer/dxviewer.cpp b/examples/dxViewer/dxviewer.cpp index 0d67b852..898b76fc 100644 --- a/examples/dxViewer/dxviewer.cpp +++ b/examples/dxViewer/dxviewer.cpp @@ -135,15 +135,15 @@ int g_freeze = 0, g_displayStyle = kDisplayStyleWireOnShaded, g_adaptive = 1, g_endCap = kEndCapGregoryBasis, - g_smoothCornerPatch = 0, + g_smoothCornerPatch = 1, g_singleCreasePatch = 1, - g_infSharpPatch = 0, + g_infSharpPatch = 1, g_drawNormals = 0, g_mbutton[3] = {0, 0, 0}; -int g_screenSpaceTess = 1, - g_fractionalSpacing = 1, - g_patchCull = 1, +int g_screenSpaceTess = 0, + g_fractionalSpacing = 0, + g_patchCull = 0, g_displayPatchCounts = 0; float g_rotate[2] = {0, 0}, diff --git a/examples/glEvalLimit/glEvalLimit.cpp b/examples/glEvalLimit/glEvalLimit.cpp index 31692151..c828fa3e 100644 --- a/examples/glEvalLimit/glEvalLimit.cpp +++ b/examples/glEvalLimit/glEvalLimit.cpp @@ -139,9 +139,9 @@ int g_currentShape = 0, g_level = 2, g_kernel = kCPU, g_endCap = kEndCapGregoryBasis, - g_smoothCornerPatch = 0, + g_smoothCornerPatch = 1, g_singleCreasePatch = 0, - g_infSharpPatch = 0, + g_infSharpPatch = 1, g_numElements = 3; int g_running = 1, diff --git a/examples/glStencilViewer/glStencilViewer.cpp b/examples/glStencilViewer/glStencilViewer.cpp index e2121562..a62086b4 100644 --- a/examples/glStencilViewer/glStencilViewer.cpp +++ b/examples/glStencilViewer/glStencilViewer.cpp @@ -121,7 +121,7 @@ int g_running = 1, g_repeatCount=0; bool g_adaptive=true, - g_infSharpPatch=false; + g_infSharpPatch=true; float g_rotate[2] = {0, 0}, g_dolly = 5, diff --git a/examples/glViewer/glViewer.cpp b/examples/glViewer/glViewer.cpp index df15c61f..baced978 100644 --- a/examples/glViewer/glViewer.cpp +++ b/examples/glViewer/glViewer.cpp @@ -184,9 +184,9 @@ int g_freeze = 0, g_displayStyle = kDisplayStyleWireOnShaded, g_adaptive = 1, g_endCap = kEndCapGregoryBasis, - g_smoothCornerPatch = 0, + g_smoothCornerPatch = 1, g_singleCreasePatch = 1, - g_infSharpPatch = 0, + g_infSharpPatch = 1, g_mbutton[3] = {0, 0, 0}, g_running = 1; diff --git a/examples/mtlViewer/mtlViewer.mm b/examples/mtlViewer/mtlViewer.mm index 8336152b..19497dff 100644 --- a/examples/mtlViewer/mtlViewer.mm +++ b/examples/mtlViewer/mtlViewer.mm @@ -303,12 +303,13 @@ struct PipelineConfig { -(instancetype)initWithDelegate:(id)delegate { self = [super init]; if (self) { - self.useSmoothCornerPatch = false; + self.useSmoothCornerPatch = true; self.useSingleCreasePatch = true; - self.useInfinitelySharpPatch = false; + self.useInfinitelySharpPatch = true; self.useStageIn = !TARGET_OS_EMBEDDED; - self.endCapMode = kEndCapBSplineBasis; - self.useScreenspaceTessellation = true; + self.endCapMode = kEndCapGregoryBasis; + self.useScreenspaceTessellation = false; + self.useFractionalTessellation = false; self.usePatchClipCulling = false; self.usePatchIndexBuffer = false; self.usePatchBackfaceCulling = false;