CommandBuffer增加几个Set
This commit is contained in:
parent
ffcf03dfd3
commit
c56827a348
@ -96,6 +96,40 @@ bool CommandBuffer::Bind(VertexInput *vi)
|
|||||||
vkCmdBindVertexBuffers(cmd_buf,0,count,vi->GetBuffer(),vi->GetOffset());
|
vkCmdBindVertexBuffers(cmd_buf,0,count,vi->GetBuffer(),vi->GetOffset());
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
void CommandBuffer::SetDepthBias(float constant_factor,float clamp,float slope_factor)
|
||||||
|
{
|
||||||
|
vkCmdSetDepthBias(cmd_buf,constant_factor,clamp,slope_factor);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CommandBuffer::SetDepthBounds(float min_db,float max_db)
|
||||||
|
{
|
||||||
|
vkCmdSetDepthBounds(cmd_buf,min_db,max_db);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CommandBuffer::SetStencilCompareMask(VkStencilFaceFlags faceMask,uint32_t compareMask)
|
||||||
|
{
|
||||||
|
vkCmdSetStencilCompareMask(cmd_buf,faceMask,compareMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CommandBuffer::SetStencilWriteMask(VkStencilFaceFlags faceMask,uint32_t compareMask)
|
||||||
|
{
|
||||||
|
vkCmdSetStencilWriteMask(cmd_buf,faceMask,compareMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CommandBuffer::SetStencilReference(VkStencilFaceFlags faceMask,uint32_t compareMask)
|
||||||
|
{
|
||||||
|
vkCmdSetStencilReference(cmd_buf,faceMask,compareMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CommandBuffer::SetBlendConstants(const float constants[4])
|
||||||
|
{
|
||||||
|
vkCmdSetBlendConstants(cmd_buf,constants);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CommandBuffer::SetLineWidth(float line_width)
|
||||||
|
{
|
||||||
|
vkCmdSetLineWidth(cmd_buf,line_width);
|
||||||
|
}
|
||||||
|
|
||||||
void CommandBuffer::Draw(const uint32_t vertex_count)
|
void CommandBuffer::Draw(const uint32_t vertex_count)
|
||||||
{
|
{
|
||||||
|
@ -26,6 +26,11 @@ public:
|
|||||||
|
|
||||||
operator VkCommandBuffer(){return cmd_buf;}
|
operator VkCommandBuffer(){return cmd_buf;}
|
||||||
|
|
||||||
|
bool Begin(RenderPass *rp,Framebuffer *fb);
|
||||||
|
bool Bind(Pipeline *p);
|
||||||
|
bool Bind(PipelineLayout *pl);
|
||||||
|
bool Bind(VertexInput *vi);
|
||||||
|
|
||||||
void SetRenderArea(const VkRect2D &ra){render_area=ra;}
|
void SetRenderArea(const VkRect2D &ra){render_area=ra;}
|
||||||
void SetClearColor(float r,float g,float b,float a=1.0f)
|
void SetClearColor(float r,float g,float b,float a=1.0f)
|
||||||
{
|
{
|
||||||
@ -41,10 +46,16 @@ public:
|
|||||||
clear_values[1].depthStencil.stencil=s;
|
clear_values[1].depthStencil.stencil=s;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Begin(RenderPass *rp,Framebuffer *fb);
|
void SetDepthBias(float constant_factor,float clamp,float slope_factor);
|
||||||
bool Bind(Pipeline *p);
|
void SetDepthBounds(float min_db,float max_db);
|
||||||
bool Bind(PipelineLayout *pl);
|
void SetStencilCompareMask(VkStencilFaceFlags faceMask,uint32_t compareMask);
|
||||||
bool Bind(VertexInput *vi);
|
void SetStencilWriteMask(VkStencilFaceFlags faceMask,uint32_t compareMask);
|
||||||
|
void SetStencilReference(VkStencilFaceFlags faceMask,uint32_t compareMask);
|
||||||
|
|
||||||
|
void SetBlendConstants(const float constants[4]);
|
||||||
|
|
||||||
|
void SetLineWidth(float);
|
||||||
|
|
||||||
void Draw(const uint32_t vertex_count);
|
void Draw(const uint32_t vertex_count);
|
||||||
void Draw(const uint32_t vertex_count,const uint32_t instance_count,const uint32_t first_vertex=0,const uint32_t first_instance=0);
|
void Draw(const uint32_t vertex_count,const uint32_t instance_count,const uint32_t first_vertex=0,const uint32_t first_instance=0);
|
||||||
bool End();
|
bool End();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user