fbprofiler.h File Reference

#include <kaydaradef.h>
#include <fbsdk/fbcomponent.h>
#include <fbsdk/fbcore.h>

Go to the source code of this file.

Classes

class   FBProfileTaskCycle
  FBProfileTaskCycle. More...
class   FBProfileTimeEvent
  FBProfileTimeEvent. More...
class   FBProfiler
  FBProfiler. More...
class   FBProfilerHelper
  FBProfilerHelper. More...

Defines

#define  FBSDK_DLL   K_DLLIMPORT
  Be sure that FBSDK_DLL is defined only once...
#define  FBProfiler_CreateTaskCycle(pClass, pR, pG, pB)
  Profiling global variable declaration for task cycle profiling in the SDK.
#define  FBProfiling_SetupTaskCycle(pClass)
  Profiling global variable setup.
#define  FBProfiling_TaskCycleIndex(pClass)   gProfilingIndex_##pClass
  Registered profiling task cycle index.

Enumerations

enum   FBProfilingMode {
  kFBProfilingModeDisabled = 0, kFBProfilingModeEvaluation, kFBProfilingModeRendering, kFBProfilingModeDevices,
  kFBProfilingModeSDK, kFBProfilingModeAllLow, kFBProfilingModeAllHi
}
 

Available Profiling modes.

More...

Functions

  __FB_FORWARD (FBProfiler)
  Forwarding of class and type declaration.
  FB_FORWARD (FBProfileTaskCycle)
  __FB_FORWARD (FBProfileTimeEvent)
  FB_FORWARD (FBEvaluateInfo)
  FB_FORWARD (FBProfilerHelper)
  FB_DEFINE_ENUM (FBSDK_DLL, ProfilingMode)
FBSDK_DLL HFBProfileTaskCycle  FBGetMainThreadTaskCycle ()
  Get root task cycle.
FBSDK_DLL HFBProfileTaskCycle  FBGetRenderingTaskCycle ()
  Get rendering task cycle.
FBSDK_DLL HFBProfileTaskCycle  FBGetEvaluationTaskCycle ()
  Get evaluation task cycle.

Define Documentation

#define FBSDK_DLL   K_DLLIMPORT

Be sure that FBSDK_DLL is defined only once...

Definition at line 44 of file fbprofiler.h.

#define FBProfiler_CreateTaskCycle (   pClass,
  pR,
  pG,
  pB 
)
Value:
int gProfilingIndex_##pClass = -1; \
    float gProfilingColor_##pClass[3] = { pR, pG, pB };

Profiling global variable declaration for task cycle profiling in the SDK.

This declaration should be created in the plug-in/script file where the profiling is to occur. It needs to be registered onces per task cycle, no need to create task cycles for each class object instance.

Parameters:
pClass Name of the task cycle. Must be unique.
pR,pG,pB Task cycle color. Used in Profiling Center for drawing.

Definition at line 60 of file fbprofiler.h.

#define FBProfiling_SetupTaskCycle (   pClass )
Value:
if(gProfilingIndex_##pClass == -1) \
        gProfilingIndex_##pClass = FBProfiler::TheOne().RegisterTaskCycle(#pClass,gProfilingColor_##pClass);

Profiling global variable setup.

This is the second step after calling FBProfiler_CreateTaskCycle. Should be called only once, preferably in the constructor. Task cycle will be registered for its unique index during this call.

Parameters:
pClass Name of the task cycle. Must be the same name that was used for FBProfiler_CreateTaskCycle.

Definition at line 69 of file fbprofiler.h.

#define FBProfiling_TaskCycleIndex (   pClass )    gProfilingIndex_##pClass

Registered profiling task cycle index.

Returns the declared variable from FBProfiler_CreateTaskCycle based on the name of the task cycle provided.

Parameters:
pClass Name of the task cycle.

Definition at line 78 of file fbprofiler.h.


Enumeration Type Documentation

Available Profiling modes.

Enumerator:
kFBProfilingModeDisabled 

All profiling disabled, this include Viewer profiling.

For the other modes, when EvaluationDepth is 0, only base information is profiled, such as FPS and evaluation rate.

kFBProfilingModeEvaluation 

Collect profiling for all known evaluation tasks (default mode).

kFBProfilingModeRendering 

Collect profiling for all known rendering tasks.

kFBProfilingModeDevices 

Collect profiling for device Input/Output and Device Evaluation.

kFBProfilingModeSDK 

Collect profiling for SDK.

kFBProfilingModeAllLow 

Collect profiling for all known tasks that doesn't increase remarkably with scene size.

For large scenes this will not influence performance.

kFBProfilingModeAllHi 

Collect profiling for all known tasks .

For large scenes there should be an influence on performance.

Definition at line 206 of file fbprofiler.h.


Function Documentation

__FB_FORWARD ( FBProfiler  )

Forwarding of class and type declaration.

FB_DEFINE_ENUM ( FBSDK_DLL  ,
ProfilingMode   
)
FBSDK_DLL HFBProfileTaskCycle FBGetMainThreadTaskCycle ( )

Get root task cycle.

FBSDK_DLL HFBProfileTaskCycle FBGetRenderingTaskCycle ( )

Get rendering task cycle.

FBSDK_DLL HFBProfileTaskCycle FBGetEvaluationTaskCycle ( )

Get evaluation task cycle.