FCT
载入中...
搜索中...
未找到
VK_FencePool.h
浏览该文件的文档.
1//
2// Created by Administrator on 2025/5/10.
3//
4
5#ifndef VK_FENCEPOOL_H
6#define VK_FENCEPOOL_H
8#include "./FencePool.h"
9namespace FCT
10{
11 class VK_FencePool : public FencePool
12 {
13 protected:
15 public:
17 {
18 m_fencePool.setDestroyCallback([](RHI::VK_Fence* fence)
19 {
20 fence->destroy();
21 });
22 }
23 void setDestroyCallback(const std::function<void(RHI::Fence*)>& callback) override
24 {
25 m_fencePool.setDestroyCallback([callback](RHI::VK_Fence* fence)
26 {
27 fence->destroy();
28 callback(fence);
29 });
30 }
32 {
33 return m_fencePool.alloc();
34 }
35 };
36
37}
38#endif //VK_FENCEPOOL_H
void destroy() override
VK_FencePool(VK_Context *ctx)
ObjectPool< RHI::VK_Fence, VK_Context * > m_fencePool
void setDestroyCallback(const std::function< void(RHI::Fence *)> &callback) override