2013-07-12 21:30:13 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* IndexBuffer.h *
|
|
|
|
* *
|
|
|
|
* XFX::Graphics::IndexBuffer class definition file *
|
|
|
|
* Copyright (c) XFX Team. All Rights Reserved *
|
|
|
|
*****************************************************************************/
|
2013-05-05 18:18:41 +02:00
|
|
|
#ifndef _XFX_GRAPHICS_INDEXBUFFER_
|
|
|
|
#define _XFX_GRAPHICS_INDEXBUFFER_
|
|
|
|
|
|
|
|
#include "Enums.h"
|
|
|
|
#include "GraphicsResource.h"
|
|
|
|
|
|
|
|
namespace XFX
|
|
|
|
{
|
|
|
|
namespace Graphics
|
|
|
|
{
|
|
|
|
class GraphicsDevice;
|
|
|
|
|
2013-07-12 21:30:13 +02:00
|
|
|
/**
|
|
|
|
* Describes the rendering order of the vertices in a vertex buffer.
|
|
|
|
*/
|
2013-05-05 18:18:41 +02:00
|
|
|
class IndexBuffer : public GraphicsResource
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
BufferUsage_t _usage;
|
|
|
|
int _indexCount;
|
|
|
|
IndexElementSize_t _elementSize;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void Dispose(bool disposing);
|
|
|
|
|
|
|
|
public:
|
|
|
|
IndexBuffer();
|
|
|
|
IndexBuffer(GraphicsDevice * const graphicsDevice, IndexElementSize_t indexElementSize, int indexCount, BufferUsage_t usage);
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
void CopyData(int offsetInBytes, T data[], int startIndex, int elementCount, uint options, bool isSetting);
|
|
|
|
template <typename T>
|
|
|
|
void GetData(int offsetInBytes, T data[], int startIndex, int elementCount);
|
|
|
|
template <typename T>
|
|
|
|
void GetData(T data[], int startIndex, int elementCount);
|
2013-07-12 21:30:13 +02:00
|
|
|
static const Type& GetType();
|
2013-05-05 18:18:41 +02:00
|
|
|
template <typename T>
|
|
|
|
void SetData(int offsetInBytes, T data[], int startIndex, int elementCount);
|
|
|
|
template <typename T>
|
|
|
|
void SetData(T data[], int startIndex, int elementCount);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_XFX_GRAPHICS_INDEXBUFFER_
|