Temporary commit to investigate build error
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#include "VulkanDescriptorSets.h"
|
||||
#include "VulkanGraphicsResources.h"
|
||||
#include "VulkanGraphicsEnums.h"
|
||||
#include "VulkanGraphics.h"
|
||||
#include "VulkanInitializer.h"
|
||||
#include "VulkanDescriptorSets.h"
|
||||
|
||||
using namespace Seele;
|
||||
using namespace Seele::Vulkan;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
#include "VulkanGraphicsResources.h"
|
||||
|
||||
namespace Seele
|
||||
|
||||
@@ -200,6 +200,10 @@ public:
|
||||
{
|
||||
return format;
|
||||
}
|
||||
inline Gfx::SeSampleCountFlags getNumSamples() const
|
||||
{
|
||||
return samples;
|
||||
}
|
||||
inline bool isDepthStencil() const
|
||||
{
|
||||
return aspect & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT);
|
||||
@@ -249,18 +253,22 @@ class Texture2D : public TextureBase, public Gfx::Texture2D
|
||||
public:
|
||||
Texture2D(PGraphics graphics, const TextureCreateInfo& createInfo, VkImage existingImage = VK_NULL_HANDLE);
|
||||
virtual ~Texture2D();
|
||||
inline uint32 getSizeX() const
|
||||
virtual uint32 getSizeX() const override
|
||||
{
|
||||
return textureHandle->sizeX;
|
||||
}
|
||||
inline uint32 getSizeY() const
|
||||
virtual uint32 getSizeY() const override
|
||||
{
|
||||
return textureHandle->sizeY;
|
||||
}
|
||||
inline Gfx::SeFormat getFormat() const
|
||||
virtual Gfx::SeFormat getFormat() const override
|
||||
{
|
||||
return textureHandle->format;
|
||||
}
|
||||
virtual Gfx::SeSampleCountFlags getNumSamples() const override
|
||||
{
|
||||
return textureHandle->getNumSamples();
|
||||
}
|
||||
inline VkImage getHandle() const
|
||||
{
|
||||
return textureHandle->image;
|
||||
@@ -312,6 +320,7 @@ protected:
|
||||
|
||||
PGraphics graphics;
|
||||
VkFormat pixelFormat;
|
||||
VkSampleCountFlags numSamples;
|
||||
VkPresentModeKHR presentMode;
|
||||
VkSwapchainKHR swapchain;
|
||||
VkSurfaceKHR surface;
|
||||
|
||||
@@ -19,7 +19,7 @@ RenderPass::RenderPass(PGraphics graphics, Gfx::PRenderTargetLayout layout)
|
||||
for (auto inputAttachment : layout->inputAttachments)
|
||||
{
|
||||
PTexture2D image = inputAttachment->getTexture().cast<Texture2D>();
|
||||
VkAttachmentDescription desc = attachments.add();
|
||||
VkAttachmentDescription& desc = attachments.add();
|
||||
desc.flags = 0;
|
||||
desc.format = cast(image->getFormat());
|
||||
desc.storeOp = cast(inputAttachment->getStoreOp());
|
||||
@@ -36,10 +36,10 @@ RenderPass::RenderPass(PGraphics graphics, Gfx::PRenderTargetLayout layout)
|
||||
}
|
||||
for (auto colorAttachment : layout->colorAttachments)
|
||||
{
|
||||
PTexture2D image = colorAttachment->getTexture().cast<Texture2D>();
|
||||
VkAttachmentDescription desc = attachments.add();
|
||||
VkAttachmentDescription& desc = attachments.add();
|
||||
desc.flags = 0;
|
||||
desc.format = cast(image->getFormat());
|
||||
desc.samples = (VkSampleCountFlagBits)colorAttachment->getNumSamples();
|
||||
desc.format = cast(colorAttachment->getFormat());
|
||||
desc.storeOp = cast(colorAttachment->getStoreOp());
|
||||
desc.loadOp = cast(colorAttachment->getLoadOp());
|
||||
desc.stencilStoreOp = cast(colorAttachment->getStencilStoreOp());
|
||||
@@ -55,8 +55,9 @@ RenderPass::RenderPass(PGraphics graphics, Gfx::PRenderTargetLayout layout)
|
||||
if (layout->depthAttachment != nullptr)
|
||||
{
|
||||
PTexture2D image = layout->depthAttachment->getTexture().cast<Texture2D>();
|
||||
VkAttachmentDescription desc = attachments.add();
|
||||
VkAttachmentDescription& desc = attachments.add();
|
||||
desc.flags = 0;
|
||||
desc.samples = (VkSampleCountFlagBits)image->getNumSamples();
|
||||
desc.format = cast(image->getFormat());
|
||||
desc.storeOp = cast(layout->depthAttachment->getStoreOp());
|
||||
desc.loadOp = cast(layout->depthAttachment->getLoadOp());
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#pragma once
|
||||
#include "VulkanGraphicsResources.h"
|
||||
|
||||
namespace Seele
|
||||
|
||||
@@ -9,7 +9,7 @@ using namespace Seele;
|
||||
using namespace Seele::Vulkan;
|
||||
|
||||
Window::Window(PGraphics graphics, const WindowCreateInfo &createInfo)
|
||||
: Gfx::Window(createInfo), graphics(graphics), instance(graphics->getInstance()), swapchain(VK_NULL_HANDLE)
|
||||
: Gfx::Window(createInfo), graphics(graphics), instance(graphics->getInstance()), swapchain(VK_NULL_HANDLE), numSamples(createInfo.numSamples), pixelFormat(cast(createInfo.pixelFormat))
|
||||
{
|
||||
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
|
||||
GLFWwindow *handle = glfwCreateWindow(createInfo.width, createInfo.height, createInfo.title, createInfo.bFullscreen ? glfwGetPrimaryMonitor() : nullptr, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user