From 2c569ad6619d6878e08a8d8f59427b547571ca13 Mon Sep 17 00:00:00 2001 From: David G Yu Date: Mon, 24 Jun 2019 17:04:25 -0700 Subject: [PATCH] Fixed mtlViewer for iOS -Fixed the iOS ViewController to set the correct irregular patch approximation mode. -Fixed the setting of fractionalSpacing to be separate from screenspace tessellation. -Fixed the configuration of the internal stage-in setting on embedded builds. --- examples/mtlViewer/iOS/ViewController.mm | 4 ++-- examples/mtlViewer/mtlViewer.h | 2 +- examples/mtlViewer/mtlViewer.mm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/mtlViewer/iOS/ViewController.mm b/examples/mtlViewer/iOS/ViewController.mm index d52b2188..89fb521b 100644 --- a/examples/mtlViewer/iOS/ViewController.mm +++ b/examples/mtlViewer/iOS/ViewController.mm @@ -98,7 +98,7 @@ _osdRenderer.displayControlMeshVertices = _controlMeshSwitch.isOn; _osdRenderer.displayControlMeshEdges = _controlMeshSwitch.isOn; _osdRenderer.usePatchClipCulling = _patchClipCullingSwitch.isOn; - _osdRenderer.useFractionalTessellation = _osdRenderer.useScreenspaceTessellation; + _osdRenderer.useFractionalTessellation = _osdRenderer.useFractionalTessellation; _osdRenderer.useAdaptive = true; _osdRenderer.freeze = true; _osdRenderer.animateVertices = false; @@ -210,7 +210,7 @@ _osdRenderer.displayControlMeshVertices = sender.isOn; } else if(sender == _screenspaceTessellationSwitch) { _osdRenderer.useScreenspaceTessellation = sender.isOn; - _osdRenderer.useFractionalTessellation = _osdRenderer.useScreenspaceTessellation; + _osdRenderer.useFractionalTessellation = _osdRenderer.useFractionalTessellation; } } diff --git a/examples/mtlViewer/mtlViewer.h b/examples/mtlViewer/mtlViewer.h index 8265a647..6f3335b5 100644 --- a/examples/mtlViewer/mtlViewer.h +++ b/examples/mtlViewer/mtlViewer.h @@ -30,8 +30,8 @@ typedef enum { kEndCapBilinearBasis = 0, kEndCapBSplineBasis, - kEndCapLegacyGregory, kEndCapGregoryBasis, + kEndCapLegacyGregory, } EndCap; typedef enum { diff --git a/examples/mtlViewer/mtlViewer.mm b/examples/mtlViewer/mtlViewer.mm index 0dc3ad37..2e7e55fa 100644 --- a/examples/mtlViewer/mtlViewer.mm +++ b/examples/mtlViewer/mtlViewer.mm @@ -342,7 +342,7 @@ struct PipelineConfig { self.useSmoothCornerPatch = true; self.useSingleCreasePatch = true; self.useInfinitelySharpPatch = true; - self.useStageIn = !TARGET_OS_EMBEDDED; + self.useStageIn = true; self.endCapMode = kEndCapGregoryBasis; self.useScreenspaceTessellation = false; self.useFractionalTessellation = false;