VERGELua API

DrawModelContext

The DrawModel callback context — per-model render hooks.

ctx:GetEntity():Entity

The entity being drawn.

ctx:GetEntityIndex():number

Index of the entity being drawn.

ctx:GetModelName():string

Name of the model being drawn.

ctx:ForcedMaterialOverride(mat:Material)

Force a material for the model being drawn.

ctx:ClearMaterialOverride()

Clear any forced material for the draw.