Пример #1
0
        /// <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();
        }
Пример #2
0
        /// <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();
        }