From ec106446b2f50c0ffa3cd179ded4dac4874111ec Mon Sep 17 00:00:00 2001 From: hyzboy Date: Tue, 16 Jul 2019 10:44:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E8=AE=A2=E5=85=B6=E5=AE=83=E8=8C=83?= =?UTF-8?q?=E4=BE=8B=E4=BB=A5=E5=8F=AF=E4=BB=A5=E6=AD=A3=E5=B8=B8=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=EF=BC=8C=E6=8E=A5=E4=B8=8B=E6=9D=A5=E5=88=B6=E4=BD=9C?= =?UTF-8?q?RenderTarget?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/Vulkan/Atomsphere.cpp | 4 ++-- example/Vulkan/Deferred.cpp | 4 ++-- example/Vulkan/Geometry2D.cpp | 4 ++-- example/Vulkan/Geometry3D.cpp | 2 +- example/Vulkan/InlineGeometryScene.cpp | 2 +- example/Vulkan/LoadModel.cpp | 2 +- example/Vulkan/SceneTree.cpp | 2 +- example/Vulkan/TGATexture.cpp | 2 +- example/Vulkan/indices_rect.cpp | 4 ++-- example/Vulkan/texture_rect.cpp | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/example/Vulkan/Atomsphere.cpp b/example/Vulkan/Atomsphere.cpp index b69926dc..8fb53621 100644 --- a/example/Vulkan/Atomsphere.cpp +++ b/example/Vulkan/Atomsphere.cpp @@ -88,7 +88,7 @@ private: bool InitPipeline() { AutoDelete - pipeline_creater=new vulkan::PipelineCreater(device,material,device->GetMainRenderPass(),device->GetExtent()); + pipeline_creater=new vulkan::PipelineCreater(device,material,swapchain->GetMainRenderPass(),swapchain->GetExtent()); pipeline_creater->SetDepthTest(true); pipeline_creater->SetDepthWrite(true); pipeline_creater->SetCullMode(VK_CULL_MODE_NONE); @@ -104,7 +104,7 @@ private: bool InitScene() { - render_root.Add(db->CreateRenderableInstance(pipeline_solid,descriptor_sets,ro_sphere),scale(1000)); + render_root.Add(db->CreateRenderableInstance(pipeline_solid,descriptor_sets,ro_sphere),scale(100)); render_root.RefreshMatrix(); render_root.ExpendToList(&render_list); diff --git a/example/Vulkan/Deferred.cpp b/example/Vulkan/Deferred.cpp index 4ac4017b..0bcf90d3 100644 --- a/example/Vulkan/Deferred.cpp +++ b/example/Vulkan/Deferred.cpp @@ -251,7 +251,7 @@ private: bool InitCompositionPipeline(SubpassParam *sp) { - AutoDelete pipeline_creater=new vulkan::PipelineCreater(device,sp->material,device->GetMainRenderPass(),device->GetExtent()); + AutoDelete pipeline_creater=new vulkan::PipelineCreater(device,sp->material,swapchain->GetMainRenderPass(),swapchain->GetExtent()); pipeline_creater->SetDepthTest(false); pipeline_creater->SetDepthWrite(false); pipeline_creater->SetCullMode(VK_CULL_MODE_NONE); @@ -394,7 +394,7 @@ private: bool InitGBufferCommandBuffer() { - gbuffer_cmd=device->CreateCommandBuffer(&gbuffer.extent,gbuffer.attachment.desc_list.GetCount()); + gbuffer_cmd=device->CreateCommandBuffer(gbuffer.extent,gbuffer.attachment.desc_list.GetCount()); if(!gbuffer_cmd) return(false); diff --git a/example/Vulkan/Geometry2D.cpp b/example/Vulkan/Geometry2D.cpp index d3c8cbef..99cfb1f3 100644 --- a/example/Vulkan/Geometry2D.cpp +++ b/example/Vulkan/Geometry2D.cpp @@ -96,7 +96,7 @@ private: bool InitUBO() { - const VkExtent2D extent=device->GetExtent(); + const VkExtent2D extent=swapchain->GetExtent(); world.mvp=ortho(extent.width,extent.height); @@ -115,7 +115,7 @@ private: bool InitPipeline() { AutoDelete - pipeline_creater=new vulkan::PipelineCreater(device,material,device->GetMainRenderPass(),device->GetExtent()); + pipeline_creater=new vulkan::PipelineCreater(device,material,swapchain->GetMainRenderPass(),swapchain->GetExtent()); pipeline_creater->CloseCullFace(); pipeline_creater->Set(PRIM_TRIANGLE_FAN); diff --git a/example/Vulkan/Geometry3D.cpp b/example/Vulkan/Geometry3D.cpp index 787c24ae..ba90e0c9 100644 --- a/example/Vulkan/Geometry3D.cpp +++ b/example/Vulkan/Geometry3D.cpp @@ -58,7 +58,7 @@ private: bool InitPipeline(MDP *mdp,const VkPrimitiveTopology primitive) { AutoDelete - pipeline_creater=new vulkan::PipelineCreater(device,mdp->material,device->GetMainRenderPass(),device->GetExtent()); + pipeline_creater=new vulkan::PipelineCreater(device,mdp->material,swapchain->GetMainRenderPass(),swapchain->GetExtent()); pipeline_creater->CloseCullFace(); pipeline_creater->Set(primitive); diff --git a/example/Vulkan/InlineGeometryScene.cpp b/example/Vulkan/InlineGeometryScene.cpp index 725f3edd..20e734b3 100644 --- a/example/Vulkan/InlineGeometryScene.cpp +++ b/example/Vulkan/InlineGeometryScene.cpp @@ -137,7 +137,7 @@ private: bool InitPipeline() { AutoDelete - pipeline_creater=new vulkan::PipelineCreater(device,material,device->GetMainRenderPass(),device->GetExtent()); + pipeline_creater=new vulkan::PipelineCreater(device,material,swapchain->GetMainRenderPass(),swapchain->GetExtent()); pipeline_creater->Set(PRIM_LINES); pipeline_line=pipeline_creater->Create(); diff --git a/example/Vulkan/LoadModel.cpp b/example/Vulkan/LoadModel.cpp index 6b3abeb7..7ea3fa0e 100644 --- a/example/Vulkan/LoadModel.cpp +++ b/example/Vulkan/LoadModel.cpp @@ -163,7 +163,7 @@ private: bool InitPipeline() { AutoDelete - pipeline_creater=new vulkan::PipelineCreater(device,material,device->GetMainRenderPass(),device->GetExtent()); + pipeline_creater=new vulkan::PipelineCreater(device,material,swapchain->GetMainRenderPass(),swapchain->GetExtent()); pipeline_creater->SetDepthTest(false); pipeline_creater->SetDepthWrite(false); pipeline_creater->SetPolygonMode(VK_POLYGON_MODE_LINE); diff --git a/example/Vulkan/SceneTree.cpp b/example/Vulkan/SceneTree.cpp index 271b3388..aec7c6b4 100644 --- a/example/Vulkan/SceneTree.cpp +++ b/example/Vulkan/SceneTree.cpp @@ -75,7 +75,7 @@ private: bool InitPipeline() { AutoDelete - pipeline_creater=new vulkan::PipelineCreater(device,material,device->GetMainRenderPass(),device->GetExtent()); + pipeline_creater=new vulkan::PipelineCreater(device,material,swapchain->GetMainRenderPass(),swapchain->GetExtent()); pipeline_creater->SetDepthTest(true); pipeline_creater->SetDepthWrite(true); pipeline_creater->CloseCullFace(); diff --git a/example/Vulkan/TGATexture.cpp b/example/Vulkan/TGATexture.cpp index 5a19f4bf..8bfc954f 100644 --- a/example/Vulkan/TGATexture.cpp +++ b/example/Vulkan/TGATexture.cpp @@ -123,7 +123,7 @@ Texture2D *LoadTGATexture(const OSString &filename,Device *device) if(header.image_type==2) { - if(header.bit==24)format=FMT_BGR8UN;else + if(header.bit==24)format=FMT_BGRA8UN;else if(header.bit==32)format=FMT_BGRA8UN; } else if(header.image_type==3&&header.bit==8) diff --git a/example/Vulkan/indices_rect.cpp b/example/Vulkan/indices_rect.cpp index f0598a62..802e0253 100644 --- a/example/Vulkan/indices_rect.cpp +++ b/example/Vulkan/indices_rect.cpp @@ -76,7 +76,7 @@ private: bool InitUBO() { - const VkExtent2D extent=device->GetExtent(); + const VkExtent2D extent=swapchain->GetExtent(); world.mvp=ortho(extent.width,extent.height); @@ -104,7 +104,7 @@ private: bool InitPipeline() { AutoDelete - pipeline_creater=new vulkan::PipelineCreater(device,material,device->GetMainRenderPass(),device->GetExtent()); + pipeline_creater=new vulkan::PipelineCreater(device,material,swapchain->GetMainRenderPass(),swapchain->GetExtent()); pipeline_creater->CloseCullFace(); pipeline_creater->Set(PRIM_TRIANGLES); diff --git a/example/Vulkan/texture_rect.cpp b/example/Vulkan/texture_rect.cpp index d0ae186e..2c988d6e 100644 --- a/example/Vulkan/texture_rect.cpp +++ b/example/Vulkan/texture_rect.cpp @@ -126,7 +126,7 @@ private: bool InitUBO() { - const VkExtent2D extent=device->GetExtent(); + const VkExtent2D extent=swapchain->GetExtent(); world.mvp=ortho(extent.width,extent.height); @@ -149,7 +149,7 @@ private: bool InitPipeline() { AutoDelete - pipeline_creater=new vulkan::PipelineCreater(device,material,device->GetMainRenderPass(),device->GetExtent()); + pipeline_creater=new vulkan::PipelineCreater(device,material,swapchain->GetMainRenderPass(),swapchain->GetExtent()); pipeline_creater->CloseCullFace(); pipeline_creater->Set(PRIM_TRIANGLES);