Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1351 from SickheadGames/verthint

Removed minVertexIndex Exception
  • Loading branch information...
commit f10c7ee0911fecc031bb1f5bf573b3c60c638c88 2 parents ca28778 + 8aab6da
@KonajuGames KonajuGames authored
Showing with 16 additions and 3 deletions.
  1. +16 −3 MonoGame.Framework/Graphics/GraphicsDevice.cs
View
19 MonoGame.Framework/Graphics/GraphicsDevice.cs
@@ -2078,13 +2078,26 @@ private int SetUserIndexBuffer<T>(T[] indexData, int indexOffset, int indexCount
}
#endif
- public void DrawIndexedPrimitives(PrimitiveType primitiveType, int baseVertex, int minVertexIndex, int numbVertices, int startIndex, int primitiveCount)
+ /// <summary>
+ /// Draw geometry by indexing into the vertex buffer.
+ /// </summary>
+ /// <param name="primitiveType">The type of primitives in the index buffer.</param>
+ /// <param name="baseVertex">Used to offset the vertex range indexed from the vertex buffer.</param>
+ /// <param name="minVertexIndex">A hint of the lowest vertex indexed relative to baseVertex.</param>
+ /// <param name="numVertices">An hint of the maximum vertex indexed.</param>
+ /// <param name="startIndex">The index within the index buffer to start drawing from.</param>
+ /// <param name="primitiveCount">The number of primitives to render from the index buffer.</param>
+ /// <remarks>Note that minVertexIndex and numVertices are unused in MonoGame and will be ignored.</remarks>
+ public void DrawIndexedPrimitives(PrimitiveType primitiveType, int baseVertex, int minVertexIndex, int numVertices, int startIndex, int primitiveCount)
{
Debug.Assert(_vertexBuffer != null, "The vertex buffer is null!");
Debug.Assert(_indexBuffer != null, "The index buffer is null!");
- if (minVertexIndex > 0)
- throw new NotImplementedException ("minVertexIndex > 0 is supported");
+ // NOTE: minVertexIndex and numVertices are only hints of the
+ // range of vertex data which will be indexed.
+ //
+ // They will only be used if the graphics API can use
+ // this range hint to optimize rendering.
#if DIRECTX
Please sign in to comment.
Something went wrong with that request. Please try again.