Render

Api for render specific data

HRenderContext

The render context

The render context


HMaterial

Material instance handle

Material instance handle


HFontMap

Font map handle

Font map handle


HConstant

Shader constant handle

Shader constant handle


HNamedConstantBuffer

Shader constant buffer handle. Holds name and valu...

Shader constant buffer handle. Holds name and values for a constant.


Result

MEMBERS

RESULT_OK -

RESULT_INVALID_CONTEXT -

RESULT_OUT_OF_RESOURCES -

RESULT_BUFFER_IS_FULL -

RESULT_INVALID_PARAMETER -


dmRender::GetMaterialVertexSpace(material)

Get the vertex space (local or world)

Get the vertex space (local or world)

PARAMETERS

material - the material

RETURN

vertex_space - the vertex space


StencilTestParams()

Struct holding stencil operation setup

Struct holding stencil operation setup

MEMBERS

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 -


dmRender::RenderObject::MAX_TEXTURE_COUNT()

The maximum number of textures the render object c...

The maximum number of textures the render object can hold (currently 8)


RenderObject()

Render objects represent an actual draw call

Render objects represent an actual draw call

MEMBERS

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


RenderListEntry(m_WorldPosition, m_Order, m_BatchKey, m_TagListKey, m_UserData, m_MinorOrder, m_MajorOrder, m_Dispatch)

Represents a renderable object (e.g. a single spri...

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

PARAMETERS

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)


RenderListOperation

Render batch callback states

Render batch callback states

MEMBERS

RENDER_LIST_OPERATION_BEGIN -

RENDER_LIST_OPERATION_BATCH -

RENDER_LIST_OPERATION_END -


RenderOrder

Render order

Render order

MEMBERS

RENDER_ORDER_WORLD -

      Used by game objects

RENDER_ORDER_AFTER_WORLD -

Used by gui


Visibility

Visibility status

Visibility status

MEMBERS

VISIBILITY_NONE -

VISIBILITY_FULL -


FrustumPlanes

Frustum planes to use in a frustum

Frustum planes to use in a frustum

MEMBERS

FRUSTUM_PLANES_SIDES -

FRUSTUM_PLANES_ALL -


FrustumOptions()

Frustum options used when setting up a draw call

Frustum options used when setting up a draw call

MEMBERS

m_FrustumMatrix - the frustum matrix

m_SkipNearFarPlanes - should the frustum culling use the near and far planes


RenderListVisibilityParams()

Visibility dispatch function callback.

Visibility dispatch function callback.

MEMBERS

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


RenderListDispatchFn

Render dispatch function callback.

Render dispatch function callback.

PARAMETERS

params - the params


RenderListDispatchParams()

Render dispatch function callback.

Render dispatch function callback.

MEMBERS

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"


HRenderListDispatch

Render dispatch function handle.

Render dispatch function handle.


RenderListDispatchFn

Render dispatch function callback.

Render dispatch function callback.

PARAMETERS

params - the params


RenderListMakeDispatch(context, dispatch_fn, visibility_fn, user_data)

Register a render dispatch function

Register a render dispatch function

PARAMETERS

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

RETURN

dispatch - the render dispatch function handle


RenderListAlloc(context, entries)

Allocates an array of render entries

Allocates an array of render entries

PARAMETERS

context - the context

entries - the number of entries to allocate

RETURN

array - the render list entry array


RenderListSubmit(context, begin, end)

Adds a render object to the current render frame

Adds a render object to the current render frame

PARAMETERS

context - the context

begin - the start of the array

end - the end of the array (i.e. "while begin!=end: *begin ..."")


AddToRender(context, ro)

Adds a render object to the current render frame

Adds a render object to the current render frame

PARAMETERS

context - the context

ro - the render object

RETURN

result - the result


GetMaterialTagListKey(material)

Gets the key to the material tag list

Gets the key to the material tag list

PARAMETERS

material - the material

RETURN

listkey - the list key


NewConstant(name_hash)

Creates a shader program constant

Creates a shader program constant

PARAMETERS

name_hash - the name of the material constant

RETURN

constant - the constant


DeleteConstant(constant)

Deletes a shader program constant

Deletes a shader program constant

PARAMETERS

constant - The shader constant


GetConstantValues(constant, num_values)

Gets the shader program constant values

Gets the shader program constant values

PARAMETERS

constant - The shader constant

num_values - (out) the array num_values

RETURN

values - the uniform values


SetConstantValues(constant, values, num_values)

Sets the shader program constant values

Sets the shader program constant values

PARAMETERS

constant - The shader constant

values - the array values

num_values - the array size (number of Vector4's)

RETURN

result - the result


GetConstantName(constant)

Gets the shader program constant name

Gets the shader program constant name

PARAMETERS

constant - The shader constant

RETURN

name - the hash name


GetConstantName(constant, name)

Gets the shader program constant name

Gets the shader program constant name

PARAMETERS

constant - The shader constant

name - the hash name


GetConstantLocation(constant)

Gets the shader program constant location

Gets the shader program constant location

PARAMETERS

constant - The shader constant

RETURN

location - the location


SetConstantLocation(constant, location)

Sets the shader program constant location

Sets the shader program constant location

PARAMETERS

constant - The shader constant

location - the location


GetConstantType(constant)

Gets the type of the constant

Gets the type of the constant

PARAMETERS

constant - The shader constant

RETURN

type - the type of the constant


SetConstantType(constant, type)

Sets the type of the constant

Sets the type of the constant

PARAMETERS

constant - The shader constant

type - the type of the constant


NewNamedConstantBuffer()

Allocates a named constant buffer

Allocates a named constant buffer

RETURN

buffer - the constants buffer


DeleteNamedConstantBuffer(buffer)

Deletes a named constant buffer

Deletes a named constant buffer

PARAMETERS

buffer - the constants buffer


ClearNamedConstantBuffer(buffer)

Clears a named constant buffer from any constants.

Clears a named constant buffer from any constants.

PARAMETERS

buffer - the constants buffer


RemoveNamedConstant(buffer, name_hash)

Removes a named constant from the buffer

Removes a named constant from the buffer

PARAMETERS

buffer - the constants buffer

name_hash - the name of the constant


SetNamedConstant(buffer, name_hash, values, num_values)

Sets one or more named constants to the buffer

Sets one or more named constants to the buffer

PARAMETERS

buffer - the constants buffer

name_hash - the name of the constant

values - the values

num_values - the number of values


SetNamedConstant(buffer, name_hash, values, num_values, constant_type)

Sets one or more named constants to the buffer wit...

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.

PARAMETERS

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


SetNamedConstants(buffer, constants, num_constants)

Sets a list of named constants to the buffer

Sets a list of named constants to the buffer

PARAMETERS

buffer - the constants buffer

constants - the constants

num_constants - the number of constants


SetNamedConstantAtIndex(buffer, name_hash, value, value_index)

Sets a named constant in the buffer at a specific ...

Sets a named constant in the buffer at a specific index

PARAMETERS

buffer - the constants buffer

name_hash - the name of the constant

value - the value

value_index - the index of the value to set

RETURN

result - the result


GetNamedConstant(buffer, name_hash, values, num_values)

Gets a named constant from the buffer

Gets a named constant from the buffer

PARAMETERS

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.

RETURN

ok - true if constant existed.


GetNamedConstant(buffer, name_hash, values, num_values, constant_type)

Gets a named constant from the buffer - with type ...

Gets a named constant from the buffer - with type information

PARAMETERS

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.

RETURN

ok - true if constant existed.


GetNamedConstantCount(buffer)

Gets number of constants in the buffer

Gets number of constants in the buffer

PARAMETERS

buffer - the constants buffer

RETURN

ok - true if constant existed.


IterateNamedConstants(buffer, callback, ctx)

Iterates over the constants

Iterates over the constants

PARAMETERS

buffer - the constants buffer

callback - the callback function void (callback)(dmhash_t name_hash, void ctx)

ctx - the callback context