Initial environment loading (not working)

This commit is contained in:
Dynamitos
2025-04-04 14:44:53 +02:00
parent 4a34220cd7
commit aa1f037cb5
41 changed files with 553 additions and 208 deletions
+5 -5
View File
@@ -17,35 +17,35 @@ Framebuffer::Framebuffer(PGraphics graphics, PRenderPass renderPass, Gfx::Render
uint32 width = 0;
uint32 height = 0;
for (auto inputAttachment : layout.inputAttachments) {
PTexture2D vkInputAttachment = inputAttachment.getTexture().cast<Texture2D>();
PTextureBase vkInputAttachment = inputAttachment.getTexture().cast<TextureBase>();
attachments.add(vkInputAttachment->getView());
description.inputAttachments[description.numInputAttachments++] = vkInputAttachment->getView();
width = std::max(width, vkInputAttachment->getWidth());
height = std::max(height, vkInputAttachment->getHeight());
}
for (auto colorAttachment : layout.colorAttachments) {
PTexture2D vkColorAttachment = colorAttachment.getTexture().cast<Texture2D>();
PTextureBase vkColorAttachment = colorAttachment.getTexture().cast<TextureBase>();
attachments.add(vkColorAttachment->getView());
description.colorAttachments[description.numColorAttachments++] = vkColorAttachment->getView();
width = std::max(width, vkColorAttachment->getWidth());
height = std::max(height, vkColorAttachment->getHeight());
}
for (auto resolveAttachment : layout.resolveAttachments) {
PTexture2D vkResolveAttachment = resolveAttachment.getTexture().cast<Texture2D>();
PTextureBase vkResolveAttachment = resolveAttachment.getTexture().cast<TextureBase>();
attachments.add(vkResolveAttachment->getView());
description.resolveAttachments[description.numResolveAttachments++] = vkResolveAttachment->getView();
width = std::max(width, vkResolveAttachment->getWidth());
height = std::max(height, vkResolveAttachment->getHeight());
}
if (layout.depthAttachment.getTexture() != nullptr) {
PTexture2D vkDepthAttachment = layout.depthAttachment.getTexture().cast<Texture2D>();
PTextureBase vkDepthAttachment = layout.depthAttachment.getTexture().cast<TextureBase>();
attachments.add(vkDepthAttachment->getView());
description.depthAttachment = vkDepthAttachment->getView();
width = std::max(width, vkDepthAttachment->getWidth());
height = std::max(height, vkDepthAttachment->getHeight());
}
if (layout.depthResolveAttachment.getTexture() != nullptr) {
PTexture2D vkDepthAttachment = layout.depthResolveAttachment.getTexture().cast<Texture2D>();
PTextureBase vkDepthAttachment = layout.depthResolveAttachment.getTexture().cast<TextureBase>();
attachments.add(vkDepthAttachment->getView());
description.depthResolveAttachment = vkDepthAttachment->getView();
width = std::max(width, vkDepthAttachment->getWidth());