diff --git a/example/Vulkan/VKBuffer.h b/example/Vulkan/VKBuffer.h index 23b29f87..6fe4166b 100644 --- a/example/Vulkan/VKBuffer.h +++ b/example/Vulkan/VKBuffer.h @@ -22,6 +22,7 @@ private: friend class Device; friend class VertexBuffer; + friend class IndexBuffer; Buffer(VkDevice d,const VulkanBuffer &vb) { @@ -71,5 +72,28 @@ public: return Buffer::Map(start*stride,size*stride); } };//class VertexBuffer:public Buffer + +class IndexBuffer:public Buffer +{ + VkIndexType index_type; + uint32_t count; + +private: + + friend class Device; + + IndexBuffer(VkDevice d,const VulkanBuffer &vb,VkIndexType it,uint32_t _count):Buffer(d,vb) + { + index_type=it; + count=_count; + } + +public: + + ~IndexBuffer()=default; + + const VkIndexType GetType ()const{return index_type;} + const uint32 GetCount()const{return count;} +};//class IndexBuffer:public Buffer VK_NAMESPACE_END #endif//HGL_GRAPH_VULKAN_BUFFER_INCLUDE