Alexandria.Engines.DarkSouls.ModelMesh.Draw C# (CSharp) Method

Draw() public method

Draw the ModelMesh.
public Draw ( ModelDrawContext context ) : void
context ModelDrawContext
return void
        public void Draw(ModelDrawContext context)
        {
            try {
                if (Program == null) {
                    Program = new ModelProgram();
                    VertexDeclaration.Bind(Program, this, VertexSize);
                    Material.Bind(context, Program);
                }

                Program.Projection = context.Projection;
                Program.View = context.View;
                Program.World = context.World;
                Program.DisplayMode = context.DisplayMode;
                DetailLevels[0].Draw(context, Program);
            } catch (Exception exception) {
                throw exception;
            }
        }