Add pipeline layout support for graphics PSOs
This commit is contained in:
25
engine/include/XCEngine/RHI/OpenGL/OpenGLPipelineLayout.h
Normal file
25
engine/include/XCEngine/RHI/OpenGL/OpenGLPipelineLayout.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "../RHIPipelineLayout.h"
|
||||
|
||||
namespace XCEngine {
|
||||
namespace RHI {
|
||||
|
||||
class OpenGLPipelineLayout : public RHIPipelineLayout {
|
||||
public:
|
||||
OpenGLPipelineLayout() = default;
|
||||
~OpenGLPipelineLayout() override = default;
|
||||
|
||||
bool Initialize(const RHIPipelineLayoutDesc& desc) override;
|
||||
void Shutdown() override;
|
||||
|
||||
void* GetNativeHandle() override { return m_initialized ? this : nullptr; }
|
||||
const RHIPipelineLayoutDesc& GetDesc() const { return m_desc; }
|
||||
|
||||
private:
|
||||
RHIPipelineLayoutDesc m_desc = {};
|
||||
bool m_initialized = false;
|
||||
};
|
||||
|
||||
} // namespace RHI
|
||||
} // namespace XCEngine
|
||||
@@ -9,6 +9,8 @@
|
||||
namespace XCEngine {
|
||||
namespace RHI {
|
||||
|
||||
class RHIPipelineLayout;
|
||||
|
||||
struct Viewport {
|
||||
float topLeftX;
|
||||
float topLeftY;
|
||||
@@ -310,6 +312,7 @@ struct GraphicsPipelineDesc {
|
||||
ShaderCompileDesc vertexShader;
|
||||
ShaderCompileDesc fragmentShader;
|
||||
ShaderCompileDesc geometryShader;
|
||||
RHIPipelineLayout* pipelineLayout = nullptr;
|
||||
InputLayoutDesc inputLayout;
|
||||
RasterizerDesc rasterizerState;
|
||||
BlendDesc blendState;
|
||||
|
||||
Reference in New Issue
Block a user