Profile

Profiling macros

DM_PROFILE

add profile scope

Adds a profiling scope. Excluded by default in release builds.

PARAMETERS

a - A name for the scope

EXAMPLES

Profile a scope

{
    DM_PROFILE("DoWork");
    DoWork1();
    DoWork2();
}


DM_PROFILE_DYN

add dynamic profile scope

Adds a profiling scope. Excluded by default in release builds. Accepts a name cache value for performance.

PARAMETERS

a - The scope name

a - The scope name hash value pointer. May be 0.

EXAMPLES

Create a dynamic profiling scope

{
    DM_PROFILE_DYN(work->m_Name, &work->m_NameHash);
    work->DoWork();
}


DM_PROFILE_TEXT

send text to the profiler

Send text to the profiler

PARAMETERS

a - The format string

a - The variable argument list

EXAMPLES

Send a string to the profiler

DM_PROFILE_TEXT("Some value: %d", value);


DM_PROPERTY_EXTERN

Declare an extern property

Declare an extern property

PARAMETERS

name - The symbol name

EXAMPLES

Use a property declared elsewhere in the same library

DM_PROPERTY_EXTERN(rmtp_GameObject);
DM_PROPERTY_U32(rmtp_ComponentsAnim, 0, FrameReset, "#", &rmtp_GameObject);


DM_PROPERTY_GROUP

Declare a property group

Declare a property group

PARAMETERS

name - The group name

desc - The description

EXAMPLES

DM_PROPERTY_GROUP(rmtp_GameObject, "My Group");


DM_PROPERTY_BOOL

bool property

Declare a property of type bool

PARAMETERS

name - The property symbol/name

default - The default value

flags - The flags. Either NoFlags or FrameReset. FrameReset makes the value reset each frame.

desc - The description

group - [optional] The parent group

EXAMPLES

DM_PROPERTY_BOOL(rmtp_MyBool, 0, FrameReset, "true or false", &rmtp_MyGroup);


DM_PROPERTY_S32

int32_t property

Declare a property of type int32_t

PARAMETERS

name - The property symbol/name

default - The default value

flags - The flags. Either NoFlags or FrameReset. FrameReset makes the value reset each frame.

desc - The description

group - [optional] The parent group

EXAMPLES

DM_PROPERTY_S32(rmtp_MyValue, 0, FrameReset, "a value", &rmtp_MyGroup);


DM_PROPERTY_U32

uint32_t property

Declare a property of type uint32_t

PARAMETERS

name - The property symbol/name

default - The default value

flags - The flags. Either NoFlags or FrameReset. FrameReset makes the value reset each frame.

desc - The description

group - [optional] The parent group

EXAMPLES

DM_PROPERTY_U32(rmtp_MyValue, 0, FrameReset, "a value", &rmtp_MyGroup);


DM_PROPERTY_F32

float property

Declare a property of type float

PARAMETERS

name - The property symbol/name

default - The default value

flags - The flags. Either NoFlags or FrameReset. FrameReset makes the value reset each frame.

desc - The description

group - [optional] The parent group

EXAMPLES

DM_PROPERTY_F32(rmtp_MyValue, 0, FrameReset, "a value", &rmtp_MyGroup);


DM_PROPERTY_S64

int64_t property

Declare a property of type int64_t

PARAMETERS

name - The property symbol/name

default - The default value

flags - The flags. Either NoFlags or FrameReset. FrameReset makes the value reset each frame.

desc - The description

group - [optional] The parent group

EXAMPLES

DM_PROPERTY_S64(rmtp_MyValue, 0, FrameReset, "a value", &rmtp_MyGroup);


DM_PROPERTY_U64

uint64_t property

Declare a property of type uint64_t

PARAMETERS

name - The property symbol/name

default - The default value

flags - The flags. Either NoFlags or FrameReset. FrameReset makes the value reset each frame.

desc - The description

group - [optional] The parent group

EXAMPLES

DM_PROPERTY_U64(rmtp_MyValue, 0, FrameReset, "a value", &rmtp_MyGroup);


DM_PROPERTY_F64

double property

Declare a property of type double

PARAMETERS

name - The property symbol/name

default - The default value

flags - The flags. Either NoFlags or FrameReset. FrameReset makes the value reset each frame.

desc - The description

group - [optional] The parent group

EXAMPLES

DM_PROPERTY_F64(rmtp_MyValue, 0, FrameReset, "a value", &rmtp_MyGroup);


DM_PROPERTY_SET_BOOL

set bool property

Set the value of a bool property

PARAMETERS

name - The property

value - The value

EXAMPLES

DM_PROPERTY_SET_BOOL(rmtp_MyBool, false);


DM_PROPERTY_SET_S32

set int32_t property

Set the value of a int32_t property

PARAMETERS

name - The property

value - The value

EXAMPLES

DM_PROPERTY_SET_S32(rmtp_MyValue, -1);


DM_PROPERTY_SET_U32

set uint32_t property

Set the value of a uint32_t property

PARAMETERS

name - The property

value - The value

EXAMPLES

DM_PROPERTY_SET_U32(rmtp_MyValue, 1);


DM_PROPERTY_SET_F32

set float property

Set the value of a float property

PARAMETERS

name - The property

value - The value

EXAMPLES

DM_PROPERTY_SET_F32(rmtp_MyValue, 1.5);


DM_PROPERTY_SET_S64

set int64_t property

Set the value of a int64_t property

PARAMETERS

name - The property

value - The value

EXAMPLES

DM_PROPERTY_SET_S64(rmtp_MyValue, -1);


DM_PROPERTY_SET_U64

set uint64_t property

Set the value of a uint64_t property

PARAMETERS

name - The property

value - The value

EXAMPLES

DM_PROPERTY_SET_U64(rmtp_MyValue, 1);


DM_PROPERTY_SET_F64

set double property

Set the value of a double property

PARAMETERS

name - The property

value - The value

EXAMPLES

DM_PROPERTY_SET_F64(rmtp_MyValue, 1.5);


DM_PROPERTY_ADD_S32

add to int32_t property

Add a value to int32_t property

PARAMETERS

name - The property

value - The value

EXAMPLES

DM_PROPERTY_ADD_S32(rmtp_MyValue, -1);


DM_PROPERTY_ADD_U32

add to uint32_t property

Add a value to uint32_t property

PARAMETERS

name - The property

value - The value

EXAMPLES

DM_PROPERTY_ADD_U32(rmtp_MyValue, 1);


DM_PROPERTY_ADD_F32

add to float property

Add a value to float property

PARAMETERS

name - The property

value - The value

EXAMPLES

DM_PROPERTY_ADD_F32(rmtp_MyValue, 1.5);


DM_PROPERTY_ADD_S64

add to int64_t property

Add a value to int64_t property

PARAMETERS

name - The property

value - The value

EXAMPLES

DM_PROPERTY_ADD_S64(rmtp_MyValue, -1);


DM_PROPERTY_ADD_U64

add to uint64_t property

Add a value to uint64_t property

PARAMETERS

name - The property

value - The value

EXAMPLES

DM_PROPERTY_ADD_U64(rmtp_MyValue, 1);


DM_PROPERTY_ADD_F64

add to double property

Add a value to double property

PARAMETERS

name - The property

value - The value

EXAMPLES

DM_PROPERTY_ADD_F64(rmtp_MyValue, 1.5);


DM_PROPERTY_RESET

reset property

Reset a property to its default value

PARAMETERS

name - The property

EXAMPLES

DM_PROPERTY_RESET(rmtp_MyValue);


HProfile

Profile snapshot handle

Profile snapshot handle


BeginFrame()

Begin profiling, eg start of frame

Begin profiling, eg start of frame

RETURN

context - The current profiling context. Must be released by #EndFrame


EndFrame(profile)

Release profile returned by #Begin

Release profile returned by #Begin

PARAMETERS

profile - Profile to release