using System;
using Chernobyl.Collections.Generic.Event;
using Chernobyl.Dependency;
using Chernobyl.Graphics.Polygon.Buffers;
using Chernobyl.Readiness;
using Microsoft.Xna.Framework.Graphics;
namespace Chernobyl.Graphics.Xna.Controllers
{
///
/// Represents an XNA index buffer.
///
/// The type of data that is going to be stored in
/// this buffer like ushort or uint. It is recommend that you use
/// s when possible to reduce the video memory used.
/// You can use s, if the number of mesh elements
/// referred to by the indices is less or equal to the highest number a
/// ushort can hold. For example, a 2 byte ushort can be a max value of
/// 65,535 so you would only use the type ushort if the number of mesh
/// elements is equal to or less than 65,535.
public class XnaIndexBuffer : XnaBuffer where TData : struct
{
///
/// Initializes a new instance of the
/// class.
///
/// The instance that gives out services for use
/// by this type and takes services from this type for use by other systems.
/// The index data to place in this buffer.
public XnaIndexBuffer(IEventCollection