#region CPL License /* Nuclex Framework Copyright (C) 2002-2009 Nuclex Development Labs This library is free software; you can redistribute it and/or modify it under the terms of the IBM Common Public License as published by the IBM Corporation; either version 1.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the IBM Common Public License for more details. You should have received a copy of the IBM Common Public License along with this library */ #endregion using System; using System.Collections.Generic; using Microsoft.Xna.Framework.Graphics; namespace Nuclex.Graphics.Batching { /// /// Draws batches of primitives using the most efficient method available /// on the platform the game is running on /// internal interface IBatchDrawer where VertexType : struct, IVertexType { /// /// Maximum number of vertices or indices a single batch is allowed to have /// /// /// This value must not change once the batch drawer is passed to a queuer /// since the queuers will size the vertex arrays according to this number. /// int MaximumBatchSize { get; } /// Selects the vertices that will be used for drawing /// Primitive vertices /// Number of vertices to draw /// Indices of the vertices to draw /// Number of vertex indices to draw void Select( VertexType[] vertices, int vertexCount, short[] indices, int indexCount ); /// Selects the vertices that will be used for drawing /// Primitive vertices /// Number of vertices to draw void Select( VertexType[] vertices, int vertexCount ); /// Draws a batch of indexed primitives /// /// Index of the first vertex in the vertex array. This vertex will become /// the new index 0 for the index buffer. /// /// Number of vertices used in the call /// /// Position at which to begin processing the index array /// /// Number of indices that will be processed /// Type of primitives to draw /// Desired graphics device settings for the primitives void Draw( int startVertex, int vertexCount, int startIndex, int indexCount, PrimitiveType type, DrawContext context ); /// Draws a batch of primitives /// Index of vertex to begin drawing with /// Number of vertices used /// Type of primitives that will be drawn /// Desired graphics device settings for the primitives void Draw( int startVertex, int vertexCount, PrimitiveType type, DrawContext context ); } } // namespace Nuclex.Graphics.Batching