From 4f47279ed5c691374fde0cb56f2f2d7b8bb983ae Mon Sep 17 00:00:00 2001 From: HuYingzhuo Date: Tue, 23 Apr 2019 11:05:00 +0800 Subject: [PATCH] =?UTF-8?q?VKPipeline=E5=A2=9E=E5=8A=A0SetDepth/SetDepthWr?= =?UTF-8?q?ite/CloseCullFace=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/Vulkan/VKPipeline.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/example/Vulkan/VKPipeline.h b/example/Vulkan/VKPipeline.h index 19ae789f..3b1fe4bb 100644 --- a/example/Vulkan/VKPipeline.h +++ b/example/Vulkan/VKPipeline.h @@ -67,10 +67,14 @@ public: void SetDepthRange( float min_depth,float max_depth){viewport.minDepth=min_depth;viewport.maxDepth=max_depth;} void SetScissor( float l,float t,float w,float h){scissor.offset.x=l;scissor.offset.y=t;scissor.extent.width=w;scissor.extent.height=h;} + void SetDepthTest( bool dt) {depthStencilState.depthTestEnable=dt;} + void SetDepthWrite( bool dw) {depthStencilState.depthWriteEnable=dw;} + void SetDepthClamp( bool dc) {rasterizer.depthClampEnable=dc;} void SetDiscard( bool discard) {rasterizer.rasterizerDiscardEnable=discard;} void SetPolygonMode(VkPolygonMode pm) {rasterizer.polygonMode =pm;} void SetCullMode( VkCullModeFlagBits cm) {rasterizer.cullMode =cm;} + void CloseCullFace() {rasterizer.cullMode =VK_CULL_MODE_NONE;} void SetFrontFace( VkFrontFace ff) {rasterizer.frontFace =ff;} void SetDepthBias( float ConstantFactor, float Clamp,