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
7
#include "
../Memory/ObjectPool.h
"
8
#include "
./FencePool.h
"
9
namespace
FCT
10
{
11
class
VK_FencePool
:
public
FencePool
12
{
13
protected
:
14
ObjectPool<RHI::VK_Fence,VK_Context*>
m_fencePool
;
15
public
:
16
VK_FencePool
(
VK_Context
* ctx) :
m_fencePool
(ctx)
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
}
31
RHI::Fence
*
alloc
()
32
{
33
return
m_fencePool
.alloc();
34
}
35
};
36
37
}
38
#endif
//VK_FENCEPOOL_H
FencePool.h
ObjectPool.h
FCT::FencePool
定义
FencePool.h:10
FCT::ObjectPool
定义
ObjectPool.h:67
FCT::RHI::Fence
定义
Fence.h:12
FCT::RHI::VK_Fence
定义
VK_Fence.h:17
FCT::RHI::VK_Fence::destroy
void destroy() override
定义
VK_Fence.cpp:31
FCT::VK_Context
定义
VK_Context.h:11
FCT::VK_FencePool::alloc
RHI::Fence * alloc()
定义
VK_FencePool.h:31
FCT::VK_FencePool::VK_FencePool
VK_FencePool(VK_Context *ctx)
定义
VK_FencePool.h:16
FCT::VK_FencePool::m_fencePool
ObjectPool< RHI::VK_Fence, VK_Context * > m_fencePool
定义
VK_FencePool.h:14
FCT::VK_FencePool::setDestroyCallback
void setDestroyCallback(const std::function< void(RHI::Fence *)> &callback) override
定义
VK_FencePool.h:23
FCT
定义
Enums.h:8
src
Context
VK_FencePool.h
制作者
1.14.0