Component Render Constants

Api for setting and updating component render constants

GuiNodeTypeDestroyFunction()


GuiNodeTypeDestroyFunction()


DM_DECLARE_COMPGUI_TYPE(symbol, name, type_create_fn, type_destroy_fn)

Registers a new gui node type to the Gui component

Registers a new gui node type to the Gui component

PARAMETERS

symbol - The unique C++ symbol name

name - The name of the node type

type_create_fn - the create function

type_destroy_fn - the destroy function. May be 0


HComponentRenderConstants

Render constants handle

Render constants handle


CreateRenderConstants()

Create a new HComponentRenderConstants container

Create a new HComponentRenderConstants container

RETURN

constants -


DestroyRenderConstants(constants)

Destroys a render constants container

Destroys a render constants container

PARAMETERS

constants - (must not be 0)


GetRenderConstant(constants, name_hash, out_constant)

Destroys a render constants container

Destroys a render constants container

PARAMETERS

constants - the constants

name_hash - the hashed name of the property

out_constant - the pointer where to store the constant

RETURN

result - returns true if the constant exists


GetRenderConstantCount(constants)

Get the number of render constants

Get the number of render constants

PARAMETERS

constants - the constants

RETURN

size - returns the number of set constants


GetRenderConstant(constants, index)

Get a render constant by index

Get a render constant by index

PARAMETERS

constants - the constants

index - the index

RETURN

constant - the pointer where to store the constant


SetRenderConstant(constants, material, name_hash, value_index, element_index, var)

Set a render constant by name. The constant must e...

Set a render constant by name. The constant must exist in the material

PARAMETERS

constants - the render constants buffer

material - the material to get default values from if constant didn't already exist in the render constants buffer

name_hash - the hashed name of the constant

value_index - index of the constant value to set, if the constant is an array

element_index - pointer to the index of the element (in range [0,3]). May be 0

var - the constant value


SetRenderConstant(constants, name_hash, values, num_values)

Set a render constant by name. The constant must e...

Set a render constant by name. The constant must exist in the material

PARAMETERS

constants - the constants

name_hash - the hashed name of the constant

values - the values

num_values - number of values in the array


ClearRenderConstant(constants, name_hash)

Removes a render constant from the container

Removes a render constant from the container

PARAMETERS

constants - the constants

name_hash - the hashed name of the constant

RETURN

result - non zero if the constant was removed


HashRenderConstants(constants, state)

Hashes the constants

Hashes the constants

PARAMETERS

constants - the constants

state - the hash state to update


AreRenderConstantsUpdated(constants)

check if the constants have changed

check if the constants have changed

PARAMETERS

constants - the constants

RETURN

result - non zero if the constants were changed


EnableRenderObjectConstants(ro, constants)

set the constants of a render object

set the constants of a render object

PARAMETERS

ro - the render object

constants - the constants


CompGetConstantCallback

Used in GetMaterialConstant to resolve a render co...

Used in GetMaterialConstant to resolve a render constant's value


CompSetConstantCallback

Used in SetMaterialConstant to set a render consta...

Used in SetMaterialConstant to set a render constant's value