using Chernobyl.Graphics.Polygon.Buffers;
namespace Chernobyl.Graphics.Xna.Controllers
{
///
/// An interface for types that contain XNA buffers.
///
public interface IXnaBuffer : IBuffer
{
///
/// Sets the XNA buffer onto the XNA graphics device or graphics card.
/// Applies the buffers state so that it can be rendered.
///
void Apply();
///
/// Passes this XNA buffer to the render passed in so the render takes
/// into account the data of the buffer.
///
/// The render that should know about this buffer.
void SetRender(XnaRender render);
}
///
/// The base class for all XNA buffer types.
///
/// The type of data that is going to be stored in
/// the buffer like ints, floats, shorts, a custom mesh element type, etc.
public abstract class XnaBuffer : Buffer, IXnaBuffer where TData : struct
{
///
/// Sets the XNA buffer onto the XNA graphics device or graphics card.
/// Applies the buffers state so that it can be rendered.
///
public abstract void Apply();
///
/// Passes this XNA buffer to the render passed in so the render takes
/// into account the data of the buffer.
///
/// The render that should know about this buffer.
public abstract void SetRender(XnaRender render);
}
}