MonoGame.Framework/Graphics/GraphicsDevice.cs
/// <summary>
/// Draw primitives of the specified type from the currently bound vertexbuffers without indexing.
/// </summary>
/// <param name="primitiveType">The type of primitives to draw.</param>
/// <param name="vertexStart">Index of the vertex to start at.</param>
/// <param name="primitiveCount">The number of primitives to draw.</param>
Draw primitives of the specified type from the currently bound vertexbuffers without indexing.
Draw primitives of the specified type from the currently bound vertexbuffers without indexing .
public void DrawPrimitives(PrimitiveType primitiveType, int vertexStart, int primitiveCount)
        {
            if (_vertexShader == null)
                throw new InvalidOperationException("Vertex shader must be set before calling DrawPrimitives.");
            if (_vertexBuffers.Count == 0)
                throw new InvalidOperationException("Vertex buffer must be set before calling DrawPrimitives.");
            if (primitiveCount <= 0)
                throw new ArgumentOutOfRangeException("primitiveCount");
            var vertexCount = GetElementCountArray(primitiveType, primitiveCount);
            PlatformDrawPrimitives(primitiveType, vertexStart, vertexCount);
            unchecked
            {
                _graphicsMetrics._drawCount++;
                _graphicsMetrics._primitiveCount +=  primitiveCount;
            }
        }
public void DrawPrimitives ( PrimitiveType primitiveType , int vertexStart , int primitiveCount ) { if ( _vertexShader == null ) throw new InvalidOperationException ( " " ) ; if ( _vertexBuffers . Count == 0 ) throw new InvalidOperationException ( " " ) ; if ( primitiveCount <= 0 ) throw new ArgumentOutOfRangeException ( " " ) ; var vertexCount = GetElementCountArray ( primitiveType , primitiveCount ) ; PlatformDrawPrimitives ( primitiveType , vertexStart , vertexCount ) ; unchecked { _graphicsMetrics . _drawCount ++ ; _graphicsMetrics . _primitiveCount += primitiveCount ; } }
Draw primitives of the specified type from the currently bound vertexbuffers without indexing.
Draw primitives of the specified type from the currently bound vertexbuffers without indexing .
primitiveType
PrimitiveType
The type of primitives to draw.
The type of primitives to draw .
vertexStart
int
Index of the vertex to start at.
Index of the vertex to start at .
primitiveCount
int
The number of primitives to draw.
The number of primitives to draw .