public void RenderMesh(Matrix4 location, Matrix4 VP, INormalShader shader) { shader.SetColor(Metal.Color); shader.SetModelspaceMatrix(location); shader.SetMVP(location * VP); MeshCollection.Ingot.Draw(); }
public override void Render(Scene s, Matrix4 VP, INormalShader shader) { shader.SetModelspaceMatrix(Modelspace); shader.SetMVP(Modelspace * VP); Draw(s); if (game.GameStats.CurrentCast != null) { UpdateCastMatrix(); shader.SetModelspaceMatrix(castModelspace * Modelspace); shader.SetMVP(castModelspace * Modelspace * VP); shader.SetColor(game.GameStats.CurrentCast.GetColor()); game.GameStats.CurrentCast.GetMesh().Draw(); shader.ResetColor(); } }