FCT
载入中...
搜索中...
未找到
VK_SemaphorePool.h
浏览该文件的文档.
1//
2// Created by Administrator on 2025/5/9.
3//
4#ifndef VK_SEMAPHOREPOOL_H
5#define VK_SEMAPHOREPOOL_H
7#include "./SemaphorePool.h"
8namespace FCT {
10 {
11 protected:
13 public:
15 {
16 m_semaphorePool.setDestroyCallback([](RHI::VK_Semaphore* semaphore)
17 {
18 semaphore->destroy();
19 });
20 }
21 void setDestroyCallback(const std::function<void(RHI::Semaphore*)>& callback) override
22 {
23 m_semaphorePool.setDestroyCallback([callback](RHI::VK_Semaphore* semaphore)
24 {
25 semaphore->destroy();
26 callback(semaphore);
27 });
28 }
30 {
31 return m_semaphorePool.alloc();
32 }
33 };
34}
35#endif //VK_SEMAPHOREPOOL_H
void destroy() override
销毁一个 信号量
void setDestroyCallback(const std::function< void(RHI::Semaphore *)> &callback) override
VK_SemaphorePool(VK_Context *ctx)
ObjectPool< RHI::VK_Semaphore, VK_Context * > m_semaphorePool
RHI::Semaphore * alloc() override