refactor(RHI): 将窗口管理接口从 RHIDevice 移至 RHISwapChain
- 从 RHIDevice 抽象基类中移除 PollEvents/SwapBuffers/ShouldClose/SetShouldClose 接口 - 这些功能现在应该通过 RHISwapChain 访问 - 符合设计文档中定义的分层架构
This commit is contained in:
@@ -82,11 +82,6 @@ public:
|
||||
void* GetNativeDevice() override;
|
||||
void* GetNativeHandle() const;
|
||||
|
||||
bool PollEvents() override;
|
||||
void SwapBuffers() override;
|
||||
bool ShouldClose() const override;
|
||||
void SetShouldClose(bool shouldClose) override;
|
||||
|
||||
D3D12CommandQueue* CreateCommandQueueImpl(const CommandQueueDesc& desc);
|
||||
D3D12CommandList* CreateCommandListImpl(const CommandListDesc& desc);
|
||||
D3D12CommandAllocator* CreateCommandAllocator(const CommandAllocatorDesc& desc);
|
||||
|
||||
@@ -23,10 +23,10 @@ public:
|
||||
GLFWwindow* GetWindow() const { return m_window; }
|
||||
const RHIDeviceInfo& GetDeviceInfoImpl() const { return m_deviceInfo; }
|
||||
|
||||
void SwapBuffers() override;
|
||||
bool PollEvents() override;
|
||||
void SetShouldClose(bool shouldClose) override;
|
||||
bool ShouldClose() const override;
|
||||
void SwapBuffers();
|
||||
bool PollEvents();
|
||||
void SetShouldClose(bool shouldClose);
|
||||
bool ShouldClose() const;
|
||||
|
||||
RHIBuffer* CreateBuffer(const BufferDesc& desc) override;
|
||||
RHITexture* CreateTexture(const TextureDesc& desc) override;
|
||||
|
||||
@@ -38,11 +38,6 @@ public:
|
||||
virtual const RHIDeviceInfo& GetDeviceInfo() const = 0;
|
||||
|
||||
virtual void* GetNativeDevice() = 0;
|
||||
|
||||
virtual bool PollEvents() = 0;
|
||||
virtual void SwapBuffers() = 0;
|
||||
virtual bool ShouldClose() const = 0;
|
||||
virtual void SetShouldClose(bool shouldClose) = 0;
|
||||
};
|
||||
|
||||
} // namespace RHI
|
||||
|
||||
@@ -293,20 +293,6 @@ RHIPipelineState* D3D12Device::CreatePipelineState(const PipelineStateDesc& desc
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool D3D12Device::PollEvents() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void D3D12Device::SwapBuffers() {
|
||||
}
|
||||
|
||||
bool D3D12Device::ShouldClose() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void D3D12Device::SetShouldClose(bool shouldClose) {
|
||||
}
|
||||
|
||||
D3D12CommandQueue* D3D12Device::CreateCommandQueueImpl(const CommandQueueDesc& desc) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user