RenderTarget doesn't set extent, it's a bug.
This commit is contained in:
parent
7e2a7bf702
commit
b8e332a109
@ -105,6 +105,7 @@ public:
|
|||||||
bool PresentBackbuffer();
|
bool PresentBackbuffer();
|
||||||
|
|
||||||
bool Submit(VkCommandBuffer);
|
bool Submit(VkCommandBuffer);
|
||||||
|
bool Submit(VkCommandBuffer,GPUSemaphore *);
|
||||||
};//class SwapchainRenderTarget:public RenderTarget
|
};//class SwapchainRenderTarget:public RenderTarget
|
||||||
VK_NAMESPACE_END
|
VK_NAMESPACE_END
|
||||||
#endif//HGL_GRAPH_VULKAN_RENDER_TARGET_INCLUDE
|
#endif//HGL_GRAPH_VULKAN_RENDER_TARGET_INCLUDE
|
||||||
|
@ -27,18 +27,28 @@ RenderTarget::RenderTarget(Device *dev,RenderPass *_rp,Framebuffer *_fb,CommandB
|
|||||||
fb=_fb;
|
fb=_fb;
|
||||||
command_buffer=_cb;
|
command_buffer=_cb;
|
||||||
|
|
||||||
|
depth_texture=dt;
|
||||||
|
|
||||||
color_count=cc;
|
color_count=cc;
|
||||||
if(color_count>0)
|
if(color_count>0)
|
||||||
{
|
{
|
||||||
color_textures=new Texture2D *[color_count];
|
color_textures=new Texture2D *[color_count];
|
||||||
hgl_cpy<Texture2D *>(color_textures,ctl,color_count);
|
hgl_cpy<Texture2D *>(color_textures,ctl,color_count);
|
||||||
|
|
||||||
|
extent.width=color_textures[0]->GetWidth();
|
||||||
|
extent.height=color_textures[0]->GetHeight();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
color_textures=nullptr;
|
color_textures=nullptr;
|
||||||
|
|
||||||
|
if(depth_texture)
|
||||||
|
{
|
||||||
|
extent.width=depth_texture->GetWidth();
|
||||||
|
extent.height=depth_texture->GetHeight();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
depth_texture=dt;
|
|
||||||
render_complete_semaphore=dev->CreateSemaphore();
|
render_complete_semaphore=dev->CreateSemaphore();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,4 +148,9 @@ bool SwapchainRenderTarget::Submit(VkCommandBuffer cb)
|
|||||||
{
|
{
|
||||||
return SubmitQueue::Submit(cb,present_complete_semaphore,render_complete_semaphore);
|
return SubmitQueue::Submit(cb,present_complete_semaphore,render_complete_semaphore);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SwapchainRenderTarget::Submit(VkCommandBuffer cb,GPUSemaphore *pce)
|
||||||
|
{
|
||||||
|
return SubmitQueue::Submit(cb,pce,render_complete_semaphore);
|
||||||
|
}
|
||||||
VK_NAMESPACE_END
|
VK_NAMESPACE_END
|
Loading…
x
Reference in New Issue
Block a user