Inherits from CC3Layer : CCLayer : CCNode
Declared in CC3PerformanceLayer.h

Overview

This application-specific CC3Scene provides a platform for testing and displaying various performance-related aspects of Cocos3D.

Using buttons, the user can select one of various node types, and determine how many copies of that node should be added to the 3D scene. Those copies are laid out in a square grid within the scene. This app then collects various statistics about the performance of the 3D scene. This customized CC3Layer extracts these statistics and display them in real-time.

Using another button, the user can also select whether the nodes in the scene are animated or not. Animating the nodes adds load because the globalTransformMatrix of each node must be updated during each update.

This layer displays the following performance statistics:

Drawing: – frames per second – count of nodes visited during drawing per frame – count of nodes drawn per frame – count of GL draw calls made to the GL engine per frame – count of primitive faces presented to the GL engine per frame

Updating: – updates per second – count of nodes updated per update pass – count of nodes whose globalTransformMatrix was recalculated per update pass

There are also two joystick controls that allow the user to control the 3D camera. By moving the camera, the user can move some of the coped nodes out of view, and can see the impact it makes on drawing performance, as those nodes are culled, and not presented to the GL engine for drawing.