Rendering

Using the sampleBuffer and metadataObjects passed to ARGSession, rendering process starts. Once rendered, didUpdateFrame of ARGSessionDelegate in ARGSession is called and it returns ARGFrame. renderedPixelBuffer in ARGFrame contains finally rendered data in CVPixelBuffer data type.

Sample App draws rendered frames using this data and OpenGLView connected to ARGScene Interface.

A sample code below shows how to obtain renderedPixelBuffer in ARGFrame from didUpdateFrame.

<Sample Code.Obtaining ARGFrame from didUpdateFrame>
ARGScene *sceneView = [[ARGScene alloc] initSceneviewAt:self.view withViewTransform:displayTramsform];
- (void)didUpdateFrame:(ARGFrame *)frame {
if ([frame renderedPixelBuffer]) {
[sceneView displayPixelBuffer:[frame renderedPixelBuffer]];;
}
}