Instanced |
public override void ApplyMaterial( Material material, RenderablePrimitiveBase renderableGeometry )
ApplyMaterial applies the material and object's world matrix to this effect.
Usually effects define two constant buffers:
- one that is can be changed only once per frame and contains data about lights,
- one that is different for each material and object.
The first constant buffer is set by calling OnApplyPerFrameSettings(ICamera, IListILight, RenderingContext) method.
The second constant buffer can be set by calling ApplyMaterial(Material, RenderablePrimitiveBase) method. This sets properties defined in Material. It also sets projection matrixes like world_view_projection and others. The device states (blend state, rasterizer state, etc.) are also set there.