From 95db470e85dfc6bb04e8c6d030949e4508ec34be Mon Sep 17 00:00:00 2001 From: hyzboy Date: Sun, 5 May 2019 00:23:14 +0800 Subject: [PATCH] =?UTF-8?q?PipelineCreater=E6=94=B9=E4=B8=BA=E7=94=A8?= =?UTF-8?q?=E5=AE=8C=E7=AB=8B=E5=8D=B3=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/Vulkan/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/example/Vulkan/main.cpp b/example/Vulkan/main.cpp index 8e7671ca..3a69b1c4 100644 --- a/example/Vulkan/main.cpp +++ b/example/Vulkan/main.cpp @@ -37,7 +37,6 @@ private: vulkan::Renderable * render_obj =nullptr; vulkan::Buffer * ubo_mvp =nullptr; - vulkan::PipelineCreater * pipeline_creater =nullptr; vulkan::Pipeline * pipeline =nullptr; vulkan::CommandBuffer ** cmd_buf =nullptr; @@ -52,7 +51,6 @@ public: SAFE_CLEAR(vertex_buffer); SAFE_CLEAR_OBJECT_ARRAY(cmd_buf,swap_chain_count); SAFE_CLEAR(pipeline); - SAFE_CLEAR(pipeline_creater); SAFE_CLEAR(ubo_mvp); SAFE_CLEAR(render_obj); SAFE_CLEAR(material); @@ -96,6 +94,7 @@ private: bool InitPipeline() { + vulkan::PipelineCreater * pipeline_creater=new vulkan::PipelineCreater(device,material); pipeline_creater->SetDepthTest(false); pipeline_creater->SetDepthWrite(false); @@ -104,6 +103,9 @@ private: pipeline=pipeline_creater->Create(); + delete pipeline_creater; + pipeline_creater=nullptr; + return pipeline; }