CC3PerformanceStatistics Class Reference
Inherits from | NSObject |
Conforms to | NSCopying |
Declared in | CC3PerformanceStatistics.h |
Overview
Collects statistics about the updating and drawing performance of the 3D scene.
To allow flexibility in calculating statistics, this class does not automatically clear the accumulated statistics. It is the responsibility of the application to read the values, and invoke the reset method on the instance periodically, to ensure this instance does not overflow. Depending on the complexity and capabilities of your application, you should reset the performance statistics at least every few seconds.
Tasks
-
updatesHandled
property -
accumulatedUpdateTime
property -
– addUpdateTime:
-
nodesUpdated
property -
– addNodesUpdated:
-
– incrementNodesUpdated
-
nodesTransformed
property -
– addNodesTransformed:
-
– incrementNodesTransformed
-
framesHandled
property -
accumulatedFrameTime
property -
– addFrameTime:
-
nodesVisitedForDrawing
property -
– addNodesVisitedForDrawing:
-
– incrementNodesVisitedForDrawing
-
nodesDrawn
property -
– addNodesDrawn:
-
– incrementNodesDrawn
-
drawingCallsMade
property -
– addDrawingCallsMade:
-
facesPresented
property -
– addFacesPresented:
-
– addSingleCallFacesPresented:
-
updateRate
property -
averageNodesUpdatedPerUpdate
property -
averageNodesTransformedPerUpdate
property -
frameRate
property -
averageNodesVisitedForDrawingPerFrame
property -
averageNodesDrawnPerFrame
property -
averageDrawingCallsMadePerFrame
property -
averageFacesPresentedPerFrame
property -
+ statistics
-
– reset
-
– fullDescription
Properties
accumulatedFrameTime
The total time accumulated for frames since the reset method was last invoked.
@property (nonatomic, readonly) CCTime accumulatedFrameTime
Declared In
CC3PerformanceStatistics.h
accumulatedUpdateTime
The total time accumulated for updates since the reset method was last invoked.
@property (nonatomic, readonly) CCTime accumulatedUpdateTime
Declared In
CC3PerformanceStatistics.h
averageDrawingCallsMadePerFrame
The average GL drawing calls made per drawing frame, calculated by dividing the drawingCallsMade property by the framesHandled property.
@property (nonatomic, readonly) GLfloat averageDrawingCallsMadePerFrame
Declared In
CC3PerformanceStatistics.h
averageFacesPresentedPerFrame
The average number of triangle faces presented to the GL engine per drawing frame, calculated by dividing the facesPresented property by the framesHandled property.
@property (nonatomic, readonly) GLfloat averageFacesPresentedPerFrame
Discussion
When drawing lines or points, this will be the total number of lines or points presented to the GL engine. This is not necessarily the number of triangles (or other primitives) that were actually drawn, because the GL engine will cull faces that are not visible to the camera.
Declared In
CC3PerformanceStatistics.h
averageNodesDrawnPerFrame
The average nodes drawn per drawing frame, calculated by dividing the nodesDrawn property by the framesHandled property.
@property (nonatomic, readonly) GLfloat averageNodesDrawnPerFrame
Discussion
The difference between the averageNodesVisitedForDrawingPerFrame property and this property is the average number of nodes per frame that were not visible or were culled and not presented to the GL engine for drawing.
Declared In
CC3PerformanceStatistics.h
averageNodesTransformedPerUpdate
The average nodes whose globalTransformMatrix was recalculated per update, calculated by dividing the nodesTransformed property by the updatesHandled property.
@property (nonatomic, readonly) GLfloat averageNodesTransformedPerUpdate
Declared In
CC3PerformanceStatistics.h
averageNodesUpdatedPerUpdate
The average nodes updated per update, calculated by dividing the nodesUpdated property by the updatesHandled property.
@property (nonatomic, readonly) GLfloat averageNodesUpdatedPerUpdate
Declared In
CC3PerformanceStatistics.h
averageNodesVisitedForDrawingPerFrame
The average nodes visited per drawing frame, calculated by dividing the nodesVisitedForDrawing property by the framesHandled property.
@property (nonatomic, readonly) GLfloat averageNodesVisitedForDrawingPerFrame
Discussion
The difference between this property and the averageNodesDrawnPerFrame property is the average number of nodes per frame that were not visible or were culled and not presented to the GL engine for drawing.
Declared In
CC3PerformanceStatistics.h
drawingCallsMade
The total number of drawing calls that were made to the GL engine (glDrawArrays & glDrawElements) since the reset method was last invoked.
@property (nonatomic, readonly) GLuint drawingCallsMade
Declared In
CC3PerformanceStatistics.h
facesPresented
The total number of triangle faces presented to the GL engine since the reset method was last invoked.
@property (nonatomic, readonly) GLuint facesPresented
Discussion
When drawing lines or points, this will be the total number of lines or points presented to the GL engine. This is not necessarily the number of triangles (or other primitives) that were actually drawn, because the GL engine will cull faces that are not visible to the camera.
Declared In
CC3PerformanceStatistics.h
frameRate
The average drawing frame rate, calculated by dividing the framesHandled property by the accumulatedFrameTime property.
@property (nonatomic, readonly) GLfloat frameRate
Declared In
CC3PerformanceStatistics.h
framesHandled
The number of frames that have been processed since the reset method was last invoked.
@property (nonatomic, readonly) GLuint framesHandled
Declared In
CC3PerformanceStatistics.h
nodesDrawn
The total number of nodes drawn by the GL engine since the reset method was last invoked.
@property (nonatomic, readonly) GLuint nodesDrawn
Discussion
The difference between the nodesVisitedForDrawing property and this property is the total number of nodes that were not visible or were culled and not presented to the GL engine for drawing.
Declared In
CC3PerformanceStatistics.h
nodesTransformed
The total number of nodes whose globalTransformMatrix was recalculated since the reset method was last invoked.
@property (nonatomic, readonly) GLuint nodesTransformed
Declared In
CC3PerformanceStatistics.h
nodesUpdated
The total number of nodes updated since the reset method was last invoked.
@property (nonatomic, readonly) GLuint nodesUpdated
Declared In
CC3PerformanceStatistics.h
nodesVisitedForDrawing
The total number of nodes visited for drawing since the reset method was last invoked. This includes both nodes that were drawn, and nodes that were culled prior to drawing.
@property (nonatomic, readonly) GLuint nodesVisitedForDrawing
Discussion
The difference between this property and the nodesDrawn property is the total number of nodes that were not visible or were culled and not presented to the GL engine for drawing.
Declared In
CC3PerformanceStatistics.h
Instance Methods
addDrawingCallsMade:
Adds the specified number of drawing calls to the drawingCallsMade property.
- (void)addDrawingCallsMade:(GLuint)callCount
Declared In
CC3PerformanceStatistics.h
addFacesPresented:
Adds the specified number of faces to the facesPresented property.
- (void)addFacesPresented:(GLuint)faceCount
Declared In
CC3PerformanceStatistics.h
addFrameTime:
Adds the specified single-frame delta-time to the accumulated frame time, and increments the count of frame handled by one.
- (void)addFrameTime:(CCTime)deltaTime
Declared In
CC3PerformanceStatistics.h
addNodesDrawn:
Adds the specified number of nodes to the nodesDrawn property.
- (void)addNodesDrawn:(GLuint)nodeCount
Declared In
CC3PerformanceStatistics.h
addNodesTransformed:
Adds the specified number of nodes to the nodesTransformed property.
- (void)addNodesTransformed:(GLuint)nodeCount
Declared In
CC3PerformanceStatistics.h
addNodesUpdated:
Adds the specified number of nodes to the nodesUpdated property.
- (void)addNodesUpdated:(GLuint)nodeCount
Declared In
CC3PerformanceStatistics.h
addNodesVisitedForDrawing:
Adds the specified number of nodes to the nodesVisitedForDrawing property.
- (void)addNodesVisitedForDrawing:(GLuint)nodeCount
Declared In
CC3PerformanceStatistics.h
addSingleCallFacesPresented:
Canvenience method that adds the specified number of faces to the facesPresented property, and increments by one the number of drawing calls made.
- (void)addSingleCallFacesPresented:(GLuint)faceCount
Declared In
CC3PerformanceStatistics.h
addUpdateTime:
Adds the specified single-update delta-time to the accumulated update time, and increments the count of updates handled by one.
- (void)addUpdateTime:(CCTime)deltaTime
Declared In
CC3PerformanceStatistics.h
fullDescription
Returns a detailed descripton of this instance.
- (NSString *)fullDescription
Declared In
CC3PerformanceStatistics.h
incrementNodesDrawn
Increments the nodesDrawn property by one.
- (void)incrementNodesDrawn
Declared In
CC3PerformanceStatistics.h
incrementNodesTransformed
Increments the nodesTransformed property by one.
- (void)incrementNodesTransformed
Declared In
CC3PerformanceStatistics.h
incrementNodesUpdated
Increments the nodesUpdated property by one.
- (void)incrementNodesUpdated
Declared In
CC3PerformanceStatistics.h
incrementNodesVisitedForDrawing
Increments the nodesVisitedForDrawing property by one.
- (void)incrementNodesVisitedForDrawing
Declared In
CC3PerformanceStatistics.h
reset
Resets all the performance statistics back to zero.
- (void)reset
Discussion
To allow flexibility in calculating statistics, this class does not automatically clear the accumulated statistics. It is the responsibility of the application to read the values, and invoke the reset method on the instance periodically, to ensure this instance does not overflow. Depending on the complexity and capabilities of your application, you should reset the performance statistics at least every few seconds.
Declared In
CC3PerformanceStatistics.h