The render context
Material instance handle
Font map handle
Shader constant handle
Shader constant buffer handle. Holds name and values for a constant.
RESULT_OK -
RESULT_INVALID_CONTEXT -
RESULT_OUT_OF_RESOURCES -
RESULT_BUFFER_IS_FULL -
RESULT_INVALID_PARAMETER -
Get the vertex space (local or world)
material - the material
vertex_space - the vertex space
Struct holding stencil operation setup
m_Func - the compare function
m_OpSFail - the stencil fail operation
m_OpDPFail - the depth pass fail operation
m_OpDPPass - the depth pass pass operation
m_Ref -
m_RefMask -
m_BufferMask -
m_ColorBufferMask -
m_ClearBuffer -
The maximum number of textures the render object can hold (currently 8)
Render objects represent an actual draw call
m_Constants - ] the shader constants
m_WorldTransform - the world transform (usually identity for batched objects)
m_TextureTransform - the texture transform
m_VertexBuffer - the vertex buffer
m_VertexDeclaration - the vertex declaration
m_IndexBuffer - the index buffer
m_Material - the material
m_Textures - ] the textures
m_PrimitiveType - the primitive type
m_IndexType - the index type (16/32 bit)
m_SourceBlendFactor - the source blend factor
m_DestinationBlendFactor - the destination blend factor
m_StencilTestParams - the stencil test params
m_VertexStart - the vertex start
m_VertexCount - the vertex count
m_SetBlendFactors - use the blend factors
m_SetStencilTest - use the stencil test
Represents a renderable object (e.g. a single sprite) The renderer will (each frame) collect all entries with the current material tag, then batch these objects together. Batching is done based on the batch key and Z value (or order for GUI nodes) The caller will also register a callback function where the batched entries will be returned. Each callback then represents a draw call, and will register a RenderObject
m_WorldPosition - the world position of the object
m_Order - the order to sort on (used if m_MajorOrder != RENDER_ORDER_WORLD)
m_BatchKey - the batch key to sort on (note: only 48 bits are currently used by renderer)
m_TagListKey - the key to the list of material tags
m_UserData - user data (available in the render dispatch callback)
m_MinorOrder - used to sort within a batch
m_MajorOrder - If RENDER_ORDER_WORLD, then sorting is done based on the world position. Otherwise the sorting uses the m_Order value directly.
m_Dispatch - The dispatch function callback (dmRender::HRenderListDispatch)
Render batch callback states
RENDER_LIST_OPERATION_BEGIN -
RENDER_LIST_OPERATION_BATCH -
RENDER_LIST_OPERATION_END -
Render order
RENDER_ORDER_WORLD -
Used by game objects
RENDER_ORDER_AFTER_WORLD -
Used by gui
Visibility status
VISIBILITY_NONE -
VISIBILITY_FULL -
Frustum planes to use in a frustum
FRUSTUM_PLANES_SIDES -
FRUSTUM_PLANES_ALL -
Frustum options used when setting up a draw call
m_FrustumMatrix - the frustum matrix
m_SkipNearFarPlanes - should the frustum culling use the near and far planes
Visibility dispatch function callback.
m_UserData - the callback user data (registered with RenderListMakeDispatch())
m_Entries - the render entry array
m_NumEntries - the number of render entries in the array
Render dispatch function callback.
params - the params
Render dispatch function callback.
m_Context - the context
m_UserData - the callback user data (registered with RenderListMakeDispatch())
m_Operation - the operation
m_Buf - the render entry array
m_Begin - the start of the render batch. contains index into the m_Buf array
m_End - the end of the render batch. Loop while "m_Begin != m_End"
Render dispatch function handle.
Render dispatch function callback.
params - the params
Register a render dispatch function
context - the context
dispatch_fn - the render batch callback function
visibility_fn - the render list visibility callback function. May be 0
user_data - userdata to the callback
dispatch - the render dispatch function handle
Allocates an array of render entries
context - the context
entries - the number of entries to allocate
array - the render list entry array
Adds a render object to the current render frame
context - the context
begin - the start of the array
end - the end of the array (i.e. "while begin!=end: *begin ..."")
Adds a render object to the current render frame
context - the context
ro - the render object
result - the result
Gets the key to the material tag list
material - the material
listkey - the list key
Creates a shader program constant
name_hash - the name of the material constant
constant - the constant
Deletes a shader program constant
constant - The shader constant
Gets the shader program constant values
constant - The shader constant
num_values - (out) the array num_values
values - the uniform values
Sets the shader program constant values
constant - The shader constant
values - the array values
num_values - the array size (number of Vector4's)
result - the result
Gets the shader program constant name
constant - The shader constant
name - the hash name
Gets the shader program constant name
constant - The shader constant
name - the hash name
Gets the shader program constant location
constant - The shader constant
location - the location
Sets the shader program constant location
constant - The shader constant
location - the location
Gets the type of the constant
constant - The shader constant
type - the type of the constant
Sets the type of the constant
constant - The shader constant
type - the type of the constant
Allocates a named constant buffer
buffer - the constants buffer
Deletes a named constant buffer
buffer - the constants buffer
Clears a named constant buffer from any constants.
buffer - the constants buffer
Removes a named constant from the buffer
buffer - the constants buffer
name_hash - the name of the constant
Sets one or more named constants to the buffer
buffer - the constants buffer
name_hash - the name of the constant
values - the values
num_values - the number of values
Sets one or more named constants to the buffer with a specified data type. Currently only dmRenderDDF::MaterialDesc::CONSTANT_TYPE_USER and dmRenderDDF::MaterialDesc::CONSTANT_TYPE_USER_MATRIX4 are supported.
buffer - the constants buffer
name_hash - the name of the constant
values - the values
num_values - the number of values
constant_type - The constant type
Sets a list of named constants to the buffer
buffer - the constants buffer
constants - the constants
num_constants - the number of constants
Sets a named constant in the buffer at a specific index
buffer - the constants buffer
name_hash - the name of the constant
value - the value
value_index - the index of the value to set
result - the result
Gets a named constant from the buffer
buffer - the constants buffer
name_hash - the name of the constant
values - (out) the values. May not be null.
num_values - (out) the number of values. May not be null.
ok - true if constant existed.
Gets a named constant from the buffer - with type information
buffer - the constants buffer
name_hash - the name of the constant
values - (out) the values. May not be null.
num_values - (out) the number of values. May not be null.
constant_type - (out) the constant type.
ok - true if constant existed.
Gets number of constants in the buffer
buffer - the constants buffer
ok - true if constant existed.
Iterates over the constants
buffer - the constants buffer
callback - the callback function void (callback)(dmhash_t name_hash, void ctx)
ctx - the callback context