mirror of
https://github.com/DrBeef/Raze.git
synced 2024-12-03 09:32:19 +00:00
611dad7f69
Not hooked up yet.
49 lines
1.5 KiB
C++
49 lines
1.5 KiB
C++
|
|
#pragma once
|
|
|
|
#include "vulkan/system/vk_objects.h"
|
|
#include "vulkan/textures/vk_imagetransition.h"
|
|
|
|
class VkRenderBuffers
|
|
{
|
|
public:
|
|
VkRenderBuffers();
|
|
~VkRenderBuffers();
|
|
|
|
void BeginFrame(int width, int height, int sceneWidth, int sceneHeight);
|
|
|
|
int GetWidth() const { return mWidth; }
|
|
int GetHeight() const { return mHeight; }
|
|
int GetSceneWidth() const { return mSceneWidth; }
|
|
int GetSceneHeight() const { return mSceneHeight; }
|
|
VkSampleCountFlagBits GetSceneSamples() const { return mSamples; }
|
|
|
|
VkTextureImage SceneColor;
|
|
VkTextureImage SceneDepthStencil;
|
|
VkTextureImage SceneNormal;
|
|
VkTextureImage SceneFog;
|
|
|
|
VkFormat SceneDepthStencilFormat = VK_FORMAT_D24_UNORM_S8_UINT;
|
|
|
|
static const int NumPipelineImages = 2;
|
|
VkTextureImage PipelineImage[NumPipelineImages];
|
|
|
|
VkTextureImage Shadowmap;
|
|
std::unique_ptr<VulkanSampler> ShadowmapSampler;
|
|
|
|
private:
|
|
void CreatePipeline(int width, int height);
|
|
void CreateScene(int width, int height, VkSampleCountFlagBits samples);
|
|
void CreateSceneColor(int width, int height, VkSampleCountFlagBits samples);
|
|
void CreateSceneDepthStencil(int width, int height, VkSampleCountFlagBits samples);
|
|
void CreateSceneFog(int width, int height, VkSampleCountFlagBits samples);
|
|
void CreateSceneNormal(int width, int height, VkSampleCountFlagBits samples);
|
|
void CreateShadowmap();
|
|
VkSampleCountFlagBits GetBestSampleCount();
|
|
|
|
int mWidth = 0;
|
|
int mHeight = 0;
|
|
int mSceneWidth = 0;
|
|
int mSceneHeight = 0;
|
|
VkSampleCountFlagBits mSamples = VK_SAMPLE_COUNT_1_BIT;
|
|
};
|