Version: stable
FUNCTIONS | |
---|---|
AreRenderConstantsUpdated() | check if the constants have changed |
ClearRenderConstant() | Removes a render constant from the container |
CreateRenderConstants() | Create a new HComponentRenderConstants container |
DestroyRenderConstants() | Destroys a render constants container |
DM_DECLARE_COMPGUI_TYPE() | Registers a new gui node type to the Gui component |
EnableRenderObjectConstants() | set the constants of a render object |
GetRenderConstant() | Destroys a render constants container |
GetRenderConstant() | Get a render constant by index |
GetRenderConstantCount() | Get the number of render constants |
GuiNodeTypeDestroyFunction() | |
GuiNodeTypeDestroyFunction() | |
HashRenderConstants() | Hashes the constants |
SetRenderConstant() | Set a render constant by name. The constant must e... |
SetRenderConstant() | Set a render constant by name. The constant must e... |
AreRenderConstantsUpdated(constants)
check if the constants have changed
PARAMETERS
constants |
dmGameSystem::HComponentRenderConstants |
the constants |
RETURNS
result |
int | non zero if the constants were changed |
ClearRenderConstant(constants,name_hash)
Removes a render constant from the container
PARAMETERS
constants |
dmGameSystem::HComponentRenderConstants |
the constants |
name_hash |
dmhash_t |
the hashed name of the constant |
RETURNS
result |
int | non zero if the constant was removed |
CreateRenderConstants()
Create a new HComponentRenderConstants container
PARAMETERS
None
RETURNS
constants |
dmGameSystem::HComponentRenderConstants |
DestroyRenderConstants(constants)
Destroys a render constants container
PARAMETERS
constants |
dmGameSystem::HComponentRenderConstants |
(must not be 0) |
DM_DECLARE_COMPGUI_TYPE(symbol,name,type_create_fn,type_destroy_fn)
Registers a new gui node type to the Gui component
PARAMETERS
symbol |
C++ symbol name |
The unique C++ symbol name |
name |
const char* |
The name of the node type |
type_create_fn |
GuiNodeTypeCreateFunction |
the create function |
type_destroy_fn |
GuiNodeTypeDestroyFunction |
the destroy function. May be 0 |
EnableRenderObjectConstants(ro,constants)
set the constants of a render object
PARAMETERS
ro |
dmRender::RenderObject* |
the render object |
constants |
dmGameSystem::HComponentRenderConstants |
the constants |
GetRenderConstant(constants,name_hash,out_constant)
Destroys a render constants container
PARAMETERS
constants |
dmGameSystem::HComponentRenderConstants |
the constants |
name_hash |
dmhash_t |
the hashed name of the property |
out_constant |
dmRender::Constant** |
the pointer where to store the constant |
RETURNS
result |
bool | returns true if the constant exists |
GetRenderConstant(constants,index)
Get a render constant by index
PARAMETERS
constants |
dmGameSystem::HComponentRenderConstants |
the constants |
index |
uint32_t |
the index |
RETURNS
constant |
dmRender::HConstant | the pointer where to store the constant |
GetRenderConstantCount(constants)
Get the number of render constants
PARAMETERS
constants |
dmGameSystem::HComponentRenderConstants |
the constants |
RETURNS
size |
uint32_t | returns the number of set constants |
GuiNodeTypeDestroyFunction()
PARAMETERS
None
GuiNodeTypeDestroyFunction()
PARAMETERS
None
HashRenderConstants(constants,state)
Hashes the constants
PARAMETERS
constants |
dmGameSystem::HComponentRenderConstants |
the constants |
state |
HashState32* |
the hash state to update |
SetRenderConstant(constants,material,name_hash,value_index,element_index,var)
Set a render constant by name. The constant must exist in the material
PARAMETERS
constants |
dmGameSystem::HComponentRenderConstants |
the render constants buffer |
material |
dmRender::HMaterial |
the material to get default values from if constant didn't already exist in the render constants buffer |
name_hash |
dmhash_t |
the hashed name of the constant |
value_index |
uint32_t |
index of the constant value to set, if the constant is an array |
element_index |
uint32_t* |
pointer to the index of the element (in range [0,3]). May be 0 |
var |
const dmGameObject::PropertyVar& |
the constant value |
SetRenderConstant(constants,name_hash,values,num_values)
Set a render constant by name. The constant must exist in the material
PARAMETERS
constants |
dmGameSystem::HComponentRenderConstants |
the constants |
name_hash |
dmhash_t |
the hashed name of the constant |
values |
dmVMath::Vector4* |
the values |
num_values |
uint32_t |
number of values in the array |