/// <summary> /// 执行一次渲染的过程。 /// <para>Execute rendering command.</para> /// </summary> /// <param name="controlMode">index buffer is accessable randomly or only by frame.</param> /// <param name="temporaryIndexBuffer">render by a temporary index buffer</param> public void Draw(IndexBuffer.ControlMode controlMode, IndexBuffer temporaryIndexBuffer = null) { this.Bind(); if (temporaryIndexBuffer != null) { temporaryIndexBuffer.Draw(controlMode); } else { this.IndexBuffer.Draw(controlMode); } this.Unbind(); }
/// <summary> /// 执行一次渲染的过程。 /// <para>Execute rendering command.</para> /// </summary> /// <param name="temporaryIndexBuffer">render by a temporary index buffer</param> public void Draw(IndexBuffer temporaryIndexBuffer = null) { this.Bind(); if (temporaryIndexBuffer != null) { temporaryIndexBuffer.Draw(); } else { this.IndexBuffer.Draw(); } this.Unbind(); }