Add code that should draw the mesh
This commit is contained in:
parent
6dd72e5439
commit
fc65d43ae8
20 changed files with 395 additions and 171 deletions
|
|
@ -85,6 +85,27 @@ void VkRenderBuffers::BeginFrame(int width, int height, int sceneWidth, int scen
|
|||
mSceneHeight = sceneHeight;
|
||||
}
|
||||
|
||||
VulkanFramebuffer* VkRenderBuffers::GetFramebuffer(const VkRenderPassKey& key)
|
||||
{
|
||||
auto& framebuffer = SceneColor.RSFramebuffers[key];
|
||||
if (framebuffer)
|
||||
return framebuffer.get();
|
||||
|
||||
FramebufferBuilder builder;
|
||||
builder.RenderPass(fb->GetRenderPassManager()->GetRenderPass(key)->GetRenderPass(0));
|
||||
builder.Size(GetWidth(), GetHeight());
|
||||
builder.AddAttachment(SceneColor.View.get());
|
||||
if (key.DrawBuffers > 1)
|
||||
builder.AddAttachment(SceneFog.View.get());
|
||||
if (key.DrawBuffers > 2)
|
||||
builder.AddAttachment(SceneNormal.View.get());
|
||||
if (key.DepthStencil)
|
||||
builder.AddAttachment(SceneDepthStencil.View.get());
|
||||
builder.DebugName("VkRenderPassSetup.Framebuffer");
|
||||
framebuffer = builder.Create(fb->GetDevice());
|
||||
return framebuffer.get();
|
||||
}
|
||||
|
||||
void VkRenderBuffers::CreatePipelineDepthStencil(int width, int height)
|
||||
{
|
||||
ImageBuilder builder;
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ public:
|
|||
int GetSceneHeight() const { return mSceneHeight; }
|
||||
VkSampleCountFlagBits GetSceneSamples() const { return mSamples; }
|
||||
|
||||
VulkanFramebuffer* GetFramebuffer(const VkRenderPassKey& key);
|
||||
|
||||
VkTextureImage SceneColor;
|
||||
VkTextureImage SceneDepthStencil;
|
||||
VkTextureImage SceneNormal;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue