예제 #1
0
        /// <summary>
        /// Draw indexed, non-instanced primitives.
        /// </summary>
        /// <param name="primitiveType">Type of the primitive to draw.</param>
        /// <param name="indexCount">Number of indices to draw.</param>
        /// <param name="startIndexLocation">The location of the first index read by the GPU from the index buffer.</param>
        /// <param name="baseVertexLocation">A value added to each index before reading a vertex from the vertex buffer.</param>
        public void DrawIndexed(PrimitiveType primitiveType, int indexCount, int startIndexLocation = 0, int baseVertexLocation = 0)
        {
            PrepareDraw(primitiveType);

            NativeDeviceContext.DrawIndexed(indexCount, startIndexLocation, baseVertexLocation);

            FrameDrawCalls++;
            FrameTriangleCount += (uint)indexCount;
        }
        /// <summary>
        /// Draw indexed, non-instanced primitives.
        /// </summary>
        /// <param name="primitiveType">Type of the primitive to draw.</param>
        /// <param name="indexCount">Number of indices to draw.</param>
        /// <param name="startIndexLocation">The location of the first index read by the GPU from the index buffer.</param>
        /// <param name="baseVertexLocation">A value added to each index before reading a vertex from the vertex buffer.</param>
        public void DrawIndexed(PrimitiveType primitiveType, int indexCount, int startIndexLocation = 0, int baseVertexLocation = 0)
        {
            PrepareDraw(primitiveType);

            NativeDeviceContext.DrawIndexed(indexCount, startIndexLocation, baseVertexLocation);
        }