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
This commit is contained in:
David G Yu 2019-06-17 17:33:40 -07:00
parent db9c01e7e0
commit 62195753a9
5 changed files with 15 additions and 14 deletions

View File

@ -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},

View File

@ -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,

View File

@ -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,

View File

@ -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;

View File

@ -303,12 +303,13 @@ struct PipelineConfig {
-(instancetype)initWithDelegate:(id<OSDRendererDelegate>)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;