Files
XCEngine/new_editor/src/Rendering/MainWindowBackdropPass.h

42 lines
1.3 KiB
C++

#pragma once
#include <XCEngine/Rendering/RenderContext.h>
#include <XCEngine/Rendering/RenderSurface.h>
#include <XCEngine/RHI/RHIDescriptorPool.h>
#include <XCEngine/RHI/RHIDescriptorSet.h>
#include <XCEngine/RHI/RHIEnums.h>
#include <XCEngine/RHI/RHIPipelineLayout.h>
#include <XCEngine/RHI/RHIPipelineState.h>
namespace XCEngine {
namespace NewEditor {
class MainWindowBackdropPass {
public:
struct RenderParams {
float elapsedSeconds = 0.0f;
bool pulseAccent = true;
};
void Shutdown();
bool Render(
const ::XCEngine::Rendering::RenderContext& renderContext,
const ::XCEngine::Rendering::RenderSurface& surface,
const RenderParams& params);
private:
bool EnsureInitialized(const ::XCEngine::Rendering::RenderContext& renderContext);
bool CreateResources(const ::XCEngine::Rendering::RenderContext& renderContext);
void DestroyResources();
::XCEngine::RHI::RHIDevice* m_device = nullptr;
::XCEngine::RHI::RHIType m_backendType = ::XCEngine::RHI::RHIType::D3D12;
::XCEngine::RHI::RHIPipelineLayout* m_pipelineLayout = nullptr;
::XCEngine::RHI::RHIDescriptorPool* m_constantPool = nullptr;
::XCEngine::RHI::RHIDescriptorSet* m_constantSet = nullptr;
::XCEngine::RHI::RHIPipelineState* m_pipelineState = nullptr;
};
} // namespace NewEditor
} // namespace XCEngine