SCNSceneRenderer.showsStatistics Settings dialog Retina and VBL?

On macOS, when you turn on SCNScenerenderer.showsStatistics property, and click the little gear icon at the bottom of the app's window,

the Settings dialog lets you toggle View->Retina and Timing->Sync with VBL.


How does one set those programatically? esp. the Retina setting. I suppose the VBL is more of a bechmark internal thing.


In a broader question, the SceneKit Settings dialog is -really- great, on par with the Scene editor for getting things working just right.

Could the SceneKit team please provide documentation/insight into using it?

The developers had a great idea in implementing it, revealing much about a SceneView's internal structure, unavailable anywhere else.

Please, please share some documentation and useage patterns for it.

I've not found any info about it, other than mention on the "SCNSceneRenderer.showsStatistics" discussion paragraph.

Replies

For those that might read this question, here's what I found out about

changing the underlying SceneKit resolution/ratio for Retina vs. non-Retina.

You can get a better frame rate in some cases depending on what you're drawing,

but at the sacrifice of lower resoluton at the same window size:

//

public var the_View: SCNView {

return self.view as! SCNView

}

//

var retinaMode0 = 2.0

var retinaMode1 = 1.0

// this is what does it...

the_View.layer?.contentsScale = retinaMode

//

// the end