PXDebug Class Reference
| Inherits from | NSObject |
| Declared in | PXDebug.h PXDebug.m |
Overview
Provides tweaks and toggles for displaying debugging information about the engine.
This class exposes only static methods.
The tweaks in this class are designed for use in a testing environment and shouldn’t be used in production code.
Tasks
-
+ drawBoundingBoxesWhen set to YES, red axis-aligned boxes are drawn around each display object.
-
+ drawHitAreasWhen set to
YESblue axis-aligned boxes are drawn around each display object’s hit area (the within which touches must land to register). -
+ halveStageRenders the entire stage at half scale. This is particularly useful when you need to see what’s going on outside of the stage’s bounds.
-
+ calculateFrameRateWhen turned on, the engine’s frame rate is calculated and can be queried via these methods:
-
+ countGLCallsWhen turned on, the amount of OpenGl calls performed each frame can be queried with the glCallCount method
-
+ glCallCountThe amount of OpenGL calls performed in the previous frame. This method returns 0 if countGLCalls is set to
NO. -
+ logErrorsWhen turned on, Pixelwave errors are logged to the console.
-
+ timeBetweenFramesThe amount of time in seconds that passed between the last two frames. This value can be used to calculate the framerate of the application.
-
+ timeBetweenLogicThe duration, in seconds, of the last logic phase.
-
+ timeBetweenRenderingThe duration, in seconds, of the last rendering phase.
-
+ timeWaitingThe amount of delay, in seconds, between the last two frames.
Class Methods
calculateFrameRate
When turned on, the engine’s frame rate is calculated and can be queried via these methods:
+ (BOOL)calculateFrameRateDeclared In
PXDebug.mcountGLCalls
When turned on, the amount of OpenGl calls performed each frame can be queried with the glCallCount method
+ (BOOL)countGLCallsDeclared In
PXDebug.mdrawBoundingBoxes
When set to YES, red axis-aligned boxes are drawn around each display object.
+ (BOOL)drawBoundingBoxesDeclared In
PXDebug.mdrawHitAreas
When set to YES blue axis-aligned boxes
are drawn around each display object’s hit area (the
within which touches must land to register).
+ (BOOL)drawHitAreasDeclared In
PXDebug.mglCallCount
The amount of OpenGL calls performed in the previous frame.
This method returns 0 if countGLCalls is set to NO.
+ (unsigned)glCallCountDeclared In
PXDebug.mhalveStage
Renders the entire stage at half scale. This is particularly useful when you need to see what’s going on outside of the stage’s bounds.
+ (BOOL)halveStageDeclared In
PXDebug.mlogErrors
When turned on, Pixelwave errors are logged to the console.
+ (BOOL)logErrorsDeclared In
PXDebug.mtimeBetweenFrames
The amount of time in seconds that passed between the last two frames. This value can be used to calculate the framerate of the application.
+ (float)timeBetweenFramesDiscussion
Returns 0 unless calculateFrameRate is set to YES.
Declared In
PXDebug.mtimeBetweenLogic
The duration, in seconds, of the last logic phase.
+ (float)timeBetweenLogicDiscussion
The logic phase involves all user code invoked via
PXEvent_EnterFrame events.
Returns 0 unless calculateFrameRate is set to YES.
Declared In
PXDebug.mtimeBetweenRendering
The duration, in seconds, of the last rendering phase.
+ (float)timeBetweenRenderingDiscussion
Returns 0 unless calculateFrameRate is set to YES.
Declared In
PXDebug.mtimeWaiting
The amount of delay, in seconds, between the last two frames.
+ (float)timeWaitingDiscussion
Frames are delayed if a frame finishes before the next frame is scheduled to run. The amount of time allotted to each frame is set through the [PXStage frameRate] property.
Returns 0 unless calculateFrameRate is set to YES.
Declared In
PXDebug.m