#ifndef IConstantMapping_h__ #define IConstantMapping_h__ #include #include "Types.h" #include #define HLSL_CONSTANT_SIZE (4*4) struct IConstantMappingData { IConstantMappingData(uint32 slot, uint32 offset, uint32 row_count, uint32 col_count) { SlotID = slot; SlotOffset = offset; RowCount = row_count; ColumnCount = col_count; } uint32 SlotID; uint32 SlotOffset; uint32 ColumnCount; uint32 RowCount; }; class IConstantMapping { public: IConstantMapping(); ~IConstantMapping(); void InsertConstant(const String& name, uint32 numRows, uint32 numCols); uint32 GetAlignedSize(); private: uint32 lastSlotId; typedef std::vector ConstantCollection; typedef std::vector::iterator ConstantCollectionItr; ConstantCollection mapping; ConstantCollection spaces; }; #endif // IConstantMapping_h__