Murl Engine Lua Addon API  Version 1.0 beta
Murl.Graph.IDrawable

The IDrawable property interface.

This interface provides setting and retrieving common properties of a drawable geometry object, such as associated material, parameters and texture slots, the maximum number of light stages applied, and enabling/disabling view culling.


Table members

Methods


SetVerticesSlot(slot)

Set the vertices slot used for rendering.

Boolean SetVerticesSlot(Integer slot)

Parameters
slotThe vertices slot.
Returns
Boolean true if successful.

GetVerticesSlot()

Get the vertices slot used for rendering.

Integer GetVerticesSlot()

Returns
Integer The vertices slot.

SetMaterialSlot(slot)

Set the material slot used for rendering.

Boolean SetMaterialSlot(Integer slot)

Parameters
slotThe material slot.
Returns
Boolean true if successful.

GetMaterialSlot()

Get the material slot used for rendering.

Integer GetMaterialSlot()

Returns
Integer The material slot.

SetParametersSlot(slot)

Set the parameters slot used for rendering.

Boolean SetParametersSlot(Integer slot)

Parameters
slotThe parameters slot.
Returns
Boolean true if successful.

GetParametersSlot()

Get the parameters slot used for rendering.

Integer GetParametersSlot()

Returns
Integer The parameters slot.

SetTextureSlot(unit, slot)

Set a texture slot used for rendering.

Boolean SetTextureSlot(Integer unit, Integer slot)

Parameters
unitThe texture unit for which to set the slot.
slotThe texture slot.
Returns
Boolean true if successful.

GetTextureSlot(unit)

Get a texture slot used for rendering.

Integer GetTextureSlot(Integer unit)

Parameters
unitThe texture unit for which to query the slot.
Returns
Integer The texture slot.

SetBufferAccessMode(mode)

Set the buffer access mode.

Boolean SetBufferAccessMode(Murl.IEnums.BufferAccessMode mode)

Parameters
modeThe access mode.
Returns
Boolean true if successful.

GetBufferAccessMode()

Get the buffer access mode.

Murl.IEnums.BufferAccessMode GetBufferAccessMode()

Returns
Murl.IEnums.BufferAccessMode The access mode.

SetPrimitiveType(type)

Set the primitive type used for rendering.

Boolean SetPrimitiveType(Murl.IEnums.PrimitiveType type)

Parameters
typeOne of the IEnums::PrimitiveType members.
Returns
Boolean true if successful.

GetPrimitiveType()

Get the primitive type used for rendering.

Murl.IEnums.PrimitiveType GetPrimitiveType()

Returns
Murl.IEnums.PrimitiveType One of the IEnums::PrimitiveType members.

SetMaxNumberOfLightStages(maxNumStages)

Set the maximum number of light stages used for rendering.

Boolean SetMaxNumberOfLightStages(Integer maxNumStages)

Parameters
maxNumStagesThe maximum number of light stages.
Returns
Boolean true if successful.

GetMaxNumberOfLightStages()

Get the maximum number of light stages used for rendering.

Integer GetMaxNumberOfLightStages()

Returns
Integer The maximum number of light stages.

SetMaxNumberOfBonesPerVertex(maxNumBones)

Set the maximum number of bones per vertex for vertex skinning.

Boolean SetMaxNumberOfBonesPerVertex(Integer maxNumBones)

Parameters
maxNumBonesThe maximum number of bones.
Returns
Boolean true if successful.

GetMaxNumberOfBonesPerVertex()

Get the maximum number of bones per vertex for vertex skinning.

Integer GetMaxNumberOfBonesPerVertex()

Returns
Integer The maximum number of bones.

SetViewCullingEnabled(enabled)

Enable/disable view culling.

Boolean SetViewCullingEnabled(Boolean enabled)

Parameters
enabledIf true, culling is performed, otherwise the geometry is always rendered.
Returns
Boolean true if successful.

IsViewCullingEnabled()

Check if view culling is enabled.

Boolean IsViewCullingEnabled()

Returns
Boolean true if enabled.

SetDynamicBatchingAllowed(allowed)

Allow/disallow dynamic batching.

Boolean SetDynamicBatchingAllowed(Boolean allowed)

Parameters
allowedIf true, the renderer tries to batch the drawable together with other drawables sharing the same material/texture/light state.
Returns
Boolean true if successful, or false if not supported by this drawable.

IsDynamicBatchingAllowed()

Check if dynamic batching is allowed.

Boolean IsDynamicBatchingAllowed()

Returns
Boolean true if allowed.

SetCpuSkinningEnabled(enabled)

Enable/disable CPU vertex skinning. Enabling CPU vertex skinning only has effect when the drawable contains skeleton information, i.e. bone indices and weights.

Boolean SetCpuSkinningEnabled(Boolean enabled)

Parameters
enabledIf true, vertex skinning is performed using the CPU, otherwise a GPU shader program must be active to perform this task.
Returns
Boolean true if successful.

IsCpuSkinningEnabled()

Check if CPU vertex skinning is enabled.

Boolean IsCpuSkinningEnabled()

Returns
Boolean true if enabled.