增加IndexBuffer
This commit is contained in:
parent
c64620dfb7
commit
89d53c615c
@ -22,6 +22,7 @@ private:
|
|||||||
|
|
||||||
friend class Device;
|
friend class Device;
|
||||||
friend class VertexBuffer;
|
friend class VertexBuffer;
|
||||||
|
friend class IndexBuffer;
|
||||||
|
|
||||||
Buffer(VkDevice d,const VulkanBuffer &vb)
|
Buffer(VkDevice d,const VulkanBuffer &vb)
|
||||||
{
|
{
|
||||||
@ -71,5 +72,28 @@ public:
|
|||||||
return Buffer::Map(start*stride,size*stride);
|
return Buffer::Map(start*stride,size*stride);
|
||||||
}
|
}
|
||||||
};//class VertexBuffer:public Buffer
|
};//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
|
VK_NAMESPACE_END
|
||||||
#endif//HGL_GRAPH_VULKAN_BUFFER_INCLUDE
|
#endif//HGL_GRAPH_VULKAN_BUFFER_INCLUDE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user