Moved VulkanFrameBuffer to vks namespce (Refs #260)
This commit is contained in:
parent
70f4daff5d
commit
f917ea6640
3 changed files with 12 additions and 12 deletions
|
|
@ -15,7 +15,7 @@
|
|||
#include "VulkanDevice.hpp"
|
||||
#include "vulkantools.h"
|
||||
|
||||
namespace vk
|
||||
namespace vks
|
||||
{
|
||||
/**
|
||||
* @brief Encapsulates a single frame buffer attachment
|
||||
|
|
@ -95,7 +95,7 @@ namespace vk
|
|||
VkFramebuffer framebuffer;
|
||||
VkRenderPass renderPass;
|
||||
VkSampler sampler;
|
||||
std::vector<vk::FramebufferAttachment> attachments;
|
||||
std::vector<vks::FramebufferAttachment> attachments;
|
||||
|
||||
/**
|
||||
* Default constructor
|
||||
|
|
@ -132,9 +132,9 @@ namespace vk
|
|||
*
|
||||
* @return Index of the new attachment
|
||||
*/
|
||||
uint32_t addAttachment(vk::AttachmentCreateInfo createinfo)
|
||||
uint32_t addAttachment(vks::AttachmentCreateInfo createinfo)
|
||||
{
|
||||
vk::FramebufferAttachment attachment;
|
||||
vks::FramebufferAttachment attachment;
|
||||
|
||||
attachment.format = createinfo.format;
|
||||
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
#include <vulkan/vulkan.h>
|
||||
#include "vulkanexamplebase.h"
|
||||
#include "vulkanbuffer.hpp"
|
||||
#include "vulkanframebuffer.hpp"
|
||||
#include "VulkanFramebuffer.hpp"
|
||||
#include "VulkanTexture.hpp"
|
||||
#include "VulkanModel.hpp"
|
||||
|
||||
|
|
@ -156,9 +156,9 @@ public:
|
|||
struct
|
||||
{
|
||||
// Framebuffer resources for the deferred pass
|
||||
vk::Framebuffer *deferred;
|
||||
vks::Framebuffer *deferred;
|
||||
// Framebuffer resources for the shadow pass
|
||||
vk::Framebuffer *shadow;
|
||||
vks::Framebuffer *shadow;
|
||||
} frameBuffers;
|
||||
|
||||
struct {
|
||||
|
|
@ -237,7 +237,7 @@ public:
|
|||
// light sources' point of view to the layers of the depth attachment in one single pass
|
||||
void shadowSetup()
|
||||
{
|
||||
frameBuffers.shadow = new vk::Framebuffer(vulkanDevice);
|
||||
frameBuffers.shadow = new vks::Framebuffer(vulkanDevice);
|
||||
|
||||
frameBuffers.shadow->width = SHADOWMAP_DIM;
|
||||
frameBuffers.shadow->height = SHADOWMAP_DIM;
|
||||
|
|
@ -246,7 +246,7 @@ public:
|
|||
// Each layer corresponds to one of the lights
|
||||
// The actual output to the separate layers is done in the geometry shader using shader instancing
|
||||
// We will pass the matrices of the lights to the GS that selects the layer by the current invocation
|
||||
vk::AttachmentCreateInfo attachmentInfo = {};
|
||||
vks::AttachmentCreateInfo attachmentInfo = {};
|
||||
attachmentInfo.format = SHADOWMAP_FORMAT;
|
||||
attachmentInfo.width = SHADOWMAP_DIM;
|
||||
attachmentInfo.height = SHADOWMAP_DIM;
|
||||
|
|
@ -275,13 +275,13 @@ public:
|
|||
// Prepare the framebuffer for offscreen rendering with multiple attachments used as render targets inside the fragment shaders
|
||||
void deferredSetup()
|
||||
{
|
||||
frameBuffers.deferred = new vk::Framebuffer(vulkanDevice);
|
||||
frameBuffers.deferred = new vks::Framebuffer(vulkanDevice);
|
||||
|
||||
frameBuffers.deferred->width = FB_DIM;
|
||||
frameBuffers.deferred->height = FB_DIM;
|
||||
|
||||
// Four attachments (3 color, 1 depth)
|
||||
vk::AttachmentCreateInfo attachmentInfo = {};
|
||||
vks::AttachmentCreateInfo attachmentInfo = {};
|
||||
attachmentInfo.width = FB_DIM;
|
||||
attachmentInfo.height = FB_DIM;
|
||||
attachmentInfo.layerCount = 1;
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Base", "Base", "{09B9A54B-F
|
|||
base\VulkanDevice.hpp = base\VulkanDevice.hpp
|
||||
base\vulkanexamplebase.cpp = base\vulkanexamplebase.cpp
|
||||
base\vulkanexamplebase.h = base\vulkanexamplebase.h
|
||||
base\vulkanframebuffer.hpp = base\vulkanframebuffer.hpp
|
||||
base\VulkanFrameBuffer.hpp = base\VulkanFrameBuffer.hpp
|
||||
base\vulkanheightmap.hpp = base\vulkanheightmap.hpp
|
||||
base\VulkanInitializers.hpp = base\VulkanInitializers.hpp
|
||||
base\VulkanModel.hpp = base\VulkanModel.hpp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue