Table of Contents

Class AnimatableRenderer

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public class AnimatableRenderer : IRenderer, IDisposable
Inheritance
AnimatableRenderer
Implements
Inherited Members
Extension Methods

Constructors

AnimatableRenderer(ICoreClientAPI, Vec3d, Vec3f, AnimatorBase, Dictionary<string, AnimationMetaData>, MeshRef, int, EnumRenderStage)

[Obsolete("Use constructor with MultiTextureMeshRef instead, the standard MeshRef texturing breaks when there is multiple texture atlasses")]
public AnimatableRenderer(ICoreClientAPI capi, Vec3d pos, Vec3f rotationDeg, AnimatorBase animator, Dictionary<string, AnimationMetaData> activeAnimationsByAnimCode, MeshRef meshref, int textureId, EnumRenderStage renderStage = EnumRenderStage.Opaque)

Parameters

capi ICoreClientAPI
pos Vec3d
rotationDeg Vec3f
animator AnimatorBase
activeAnimationsByAnimCode Dictionary<string, AnimationMetaData>
meshref MeshRef
textureId int
renderStage EnumRenderStage

AnimatableRenderer(ICoreClientAPI, Vec3d, Vec3f, AnimatorBase, Dictionary<string, AnimationMetaData>, MultiTextureMeshRef, EnumRenderStage)

public AnimatableRenderer(ICoreClientAPI capi, Vec3d pos, Vec3f rotationDeg, AnimatorBase animator, Dictionary<string, AnimationMetaData> activeAnimationsByAnimCode, MultiTextureMeshRef meshref, EnumRenderStage renderStage = EnumRenderStage.Opaque)

Parameters

capi ICoreClientAPI
pos Vec3d
rotationDeg Vec3f
animator AnimatorBase
activeAnimationsByAnimCode Dictionary<string, AnimationMetaData>
meshref MultiTextureMeshRef
renderStage EnumRenderStage

Fields

CustomTransform

public float[] CustomTransform

Field Value

float[]

FogAffectedness

public float FogAffectedness

Field Value

float

LightAffected

public bool LightAffected

Field Value

bool

ModelMat

public float[] ModelMat

Field Value

float[]

ScaleX

public float ScaleX

Field Value

float

ScaleY

public float ScaleY

Field Value

float

ScaleZ

public float ScaleZ

Field Value

float

ShouldRender

public bool ShouldRender

Field Value

bool

StabilityAffected

public bool StabilityAffected

Field Value

bool

activeAnimationsByAnimCode

protected Dictionary<string, AnimationMetaData> activeAnimationsByAnimCode

Field Value

Dictionary<string, AnimationMetaData>

animator

protected AnimatorBase animator

Field Value

AnimatorBase

backfaceCulling

public bool backfaceCulling

Field Value

bool

capi

protected ICoreClientAPI capi

Field Value

ICoreClientAPI

meshref

public MeshRef meshref

Field Value

MeshRef

mtmeshref

public MultiTextureMeshRef mtmeshref

Field Value

MultiTextureMeshRef

pos

protected Vec3d pos

Field Value

Vec3d

renderColor

public Vec4f renderColor

Field Value

Vec4f

rotationDeg

public Vec3f rotationDeg

Field Value

Vec3f

textureId

public int textureId

Field Value

int

Properties

RenderOrder

0 = drawn first, 1 = drawn last
Default render orders by render stage:
Before:
0 = Ambient Manager
0 = Camera

Opaque:
0.1 = Blue sky (Icosahedron)
0.2 = Night skybox
0.3 = Sun and moon
0.37 = Terrain opaque
0.4 = Enitities
0.5 = Decals
0.5 = Debug wireframe
0.6 = particles
0.7 = Cinematic camera line preview
0.8 = fp held item
0.9 = held item opaque custom renderer

OIT:
0.2 = Frame buffer debug screen
0.35 = Clouds
0.37 = Terrain oit
0.4 = Enitities
0.6 = particles
0.9 = held item oit custom renderer

Shadow far:
0 = shadow map init
0.37 = Terrain shadow far
0.4 = Enitities

Shadow far done:
1 = shadow map finish

Shadow near:
0 = shadow map init
0.37 = Terrain shadow near
0.4 = Enitities

Shadow near done:
1 = shadow map finish
Ortho:
0.2 = Frame buffer debug screen
0.4 = Enitities
0.9 = held item ortho custom renderer
0.95 = sleeping overlay
0.98 = bow/spear aiming reticle
1 = Gui manager
1.02 = crosshair and mouse cursor

AfterFinalComposition:
2 = screenshot

Done:
0.1 = gui manager
2 = screenshot

0.98 = Cinematic camera camera advancing and frame capture when recording
0.99 = Chunk Tesselator Manager (uploads new/modified chunk meshes)
0.999 = Compress chunks scan
1 = video recorder

public double RenderOrder { get; }

Property Value

double

RenderRange

Within what range to the player OnRenderFrame() should be called (currently not used!)

public int RenderRange { get; }

Property Value

int

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

OnRenderFrame(float, EnumRenderStage)

Called every frame for rendering whatever you need to render

public void OnRenderFrame(float dt, EnumRenderStage stage)

Parameters

dt float
stage EnumRenderStage