FCT
载入中...
搜索中...
未找到
FCT::Context类 参考abstract

#include <Context.h>

类 FCT::Context 继承关系图:
Inheritance graph
FCT::Context 的协作图:
Collaboration graph

struct  LogicTaskData

Public 成员函数

template<typename T>
T * createResource ()
virtual RHI::RasterizationPipelinecreateTraditionPipeline ()=0
StaticMesh< uint32_t > * createMesh (const ModelMesh *modelMesh, const VertexLayout &layout)
StaticMesh< uint32_t > * loadMesh (const std::string &filename, const std::string &meshName, const VertexLayout &layout)
ImageloadTexture (const std::string &filename)
void submitThread ()
void maxFrameInFlight (uint32_t maxFrameInFlight)
uint32_t maxFrameInFlight () const
uint32_t currentSubmitFrameIndex () const
uint32_t currentFrameIndex ()
RHI::DescriptorPoolgetDescriptorPool ()
uint32_t currentLogicFrameIndex () const
void addRef ()
void release ()
size_t count ()
 operator bool () const
void trigger (const Event &event)
void enqueue (Event &&event)
void update ()
void updateAll ()
SubscribeId subscribe (Func &&func)
void unsubscribe (SubscribeId subscribeId)
void unsubscribeAll ()
初始化与配置 (Initialization & Configuration)
void create (ContextCreateFlags flag=ContextCreateFlag::defaultConfig)
模块管理 (Module Management)
template<typename T>
void addModule ()
template<typename T>
void removeModule ()
template<typename T>
T * getModule ()
流程控制
auto & syncTickers ()
auto & submitTickers ()
void flush ()
窗口管理 (Window Management)
const std::vector< Window * > & getBindWindows ()
void onWindowBound (Window *wnd)
着色器编译 (Shader Compilation)
void createCompiler ()
ShaderCompilergetCompiler ()
ShaderGeneratorgetGenerator ()
SubmitThread内部实现接口

以_开头的函数供自定义或内部使用

void _nextFrame ()
void _currentFlush ()
constexpr void _waitCurrentFlush ()
constexpr void _waitForNextFrame ()
void advanceLogicFrame ()
void advanceSubmitFrame ()

Protected 成员函数

 Context (Runtime *runtime)
virtual ~Context ()
virtual void createPlatform ()=0
void postLogicTask (const std::function< void()> &task)
virtual void deleteThis ()

Protected 属性

boost::lockfree::queue< LogicTaskData *, boost::lockfree::capacity< 1024 > > m_logicTask
FlowControlm_flowControl
Devicem_resourceDevice
ModelLoaderm_modelLoader
RenderGraphm_renderGraph
ImageLoaderm_imageLoader
ResourceManagerm_resourceManager
ShaderCompilerm_compiler
ShaderGeneratorm_generator
CommandBufferGraphm_cmdGraph
SubmitTicker m_ticker
std::vector< Window * > m_bindWindows
bool m_nextFrame
bool m_currentFlush
std::thread m_submitThread
bool m_ctxRunning
uint32_t m_maxFrameInFlight
RHI::DescriptorPoolm_descriptorPool
size_t m_frameIndex = 0
size_t m_logicFrameIndex = 0
size_t m_submitFrameIndex = 0
std::thread::id m_submitThreadId
std::atomic< size_t > m_refCount

静态 Private 成员函数

static constexpr auto getEventTypeId ()

Private 属性

std::conditional_t< EventSystemConfig::TriggerOnly::EventAsData, std::unordered_map< entt::id_type, std::unordered_map< SubscribeId, std::unique_ptr< IEventHandler > > >, std::unordered_map< entt::id_type, std::unordered_map< SubscribeId, std::unique_ptr< IEventIdentifierHandler > > > > m_handlers
std::conditional_t< EventSystemConfig::TriggerOnly::EnableQueue, std::unordered_map< entt::id_type, std::vector< std::function< void()> > >, std::monostate > m_eventQueue
SubscribeId m_nextSubscribeId

详细描述

在文件 Context.h97 行定义.

构造及析构函数说明

◆ Context()

FCT::Context::Context ( Runtime * runtime)
protected

在文件 Context.cpp59 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ ~Context()

FCT::Context::~Context ( )
protectedvirtual

在文件 Context.cpp126 行定义.

成员函数说明

◆ _currentFlush()

void FCT::Context::_currentFlush ( )

在文件 Context.cpp14 行定义.

这是这个函数的调用关系图:

◆ _nextFrame()

void FCT::Context::_nextFrame ( )

在文件 Context.cpp10 行定义.

这是这个函数的调用关系图:

◆ _waitCurrentFlush()

void FCT::Context::_waitCurrentFlush ( )
inlineconstexpr

在文件 Context.h184 行定义.

这是这个函数的调用关系图:

◆ _waitForNextFrame()

void FCT::Context::_waitForNextFrame ( )
inlineconstexpr

在文件 Context.h188 行定义.

这是这个函数的调用关系图:

◆ addModule()

template<typename T>
void FCT::Context::addModule ( )

在文件 Context.h275 行定义.

这是这个函数的调用关系图:

◆ addRef()

void FCT::RefCount::addRef ( )
inlineinherited

在文件 RefCount.h10 行定义.

这是这个函数的调用关系图:

◆ advanceLogicFrame()

void FCT::Context::advanceLogicFrame ( )
inline

在文件 Context.h192 行定义.

这是这个函数的调用关系图:

◆ advanceSubmitFrame()

void FCT::Context::advanceSubmitFrame ( )
inline

在文件 Context.h196 行定义.

这是这个函数的调用关系图:

◆ count()

size_t FCT::RefCount::count ( )
inlineinherited

在文件 RefCount.h19 行定义.

这是这个函数的调用关系图:

◆ create()

void FCT::Context::create ( ContextCreateFlags flag = ContextCreateFlag::defaultConfig)

在文件 Context.cpp131 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ createCompiler()

void FCT::Context::createCompiler ( )

在文件 runtime.cpp8 行定义.

这是这个函数的调用关系图:

◆ createMesh()

StaticMesh< uint32_t > * FCT::Context::createMesh ( const ModelMesh * modelMesh,
const VertexLayout & layout )

在文件 Context.cpp144 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ createPlatform()

virtual void FCT::Context::createPlatform ( )
protectedpure virtual

FCT::VK_Context 内被实现.

函数调用图:
这是这个函数的调用关系图:

◆ createResource()

template<typename T>
T * FCT::Context::createResource ( )
inline

在文件 Context.hpp38 行定义.

这是这个函数的调用关系图:

◆ createTraditionPipeline()

virtual RHI::RasterizationPipeline * FCT::Context::createTraditionPipeline ( )
pure virtual

FCT::VK_Context 内被实现.

函数调用图:

◆ currentFrameIndex()

uint32_t FCT::Context::currentFrameIndex ( )
inline

在文件 Context.h255 行定义.

◆ currentLogicFrameIndex()

uint32_t FCT::Context::currentLogicFrameIndex ( ) const
inline

在文件 Context.h265 行定义.

◆ currentSubmitFrameIndex()

uint32_t FCT::Context::currentSubmitFrameIndex ( ) const
inline

在文件 Context.h246 行定义.

◆ deleteThis()

virtual void FCT::RefCount::deleteThis ( )
inlineprotectedvirtualinherited

FCT::RHI::Fence , 以及 FCT::RHI::Semaphore 重载.

在文件 RefCount.h27 行定义.

这是这个函数的调用关系图:

◆ enqueue()

void FCT::IEventSystem< EventSystemConfig::TriggerOnly >::enqueue ( Event && event)
inlineinherited

在文件 IEventSystem.h138 行定义.

◆ flush()

void FCT::Context::flush ( )
inline

在文件 Context.hpp15 行定义.

函数调用图:

◆ getBindWindows()

const std::vector< Window * > & FCT::Context::getBindWindows ( )
inline

在文件 Context.h162 行定义.

◆ getCompiler()

ShaderCompiler * FCT::Context::getCompiler ( )
inline

在文件 Context.h174 行定义.

◆ getDescriptorPool()

RHI::DescriptorPool * FCT::Context::getDescriptorPool ( )
inline

在文件 Context.hpp32 行定义.

◆ getEventTypeId()

constexpr auto FCT::IEventSystem< EventSystemConfig::TriggerOnly >::getEventTypeId ( )
inlinestaticconstexprprivateinherited

在文件 IEventSystem.h49 行定义.

◆ getGenerator()

ShaderGenerator * FCT::Context::getGenerator ( )
inline

在文件 Context.h175 行定义.

◆ getModule()

template<typename T>
T * FCT::Context::getModule ( )

在文件 Context.h305 行定义.

这是这个函数的调用关系图:

◆ loadMesh()

StaticMesh< uint32_t > * FCT::Context::loadMesh ( const std::string & filename,
const std::string & meshName,
const VertexLayout & layout )

在文件 Context.cpp171 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ loadTexture()

Image * FCT::Context::loadTexture ( const std::string & filename)

在文件 Context.cpp19 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ maxFrameInFlight() [1/2]

uint32_t FCT::Context::maxFrameInFlight ( ) const
inline

在文件 Context.h245 行定义.

这是这个函数的调用关系图:

◆ maxFrameInFlight() [2/2]

void FCT::Context::maxFrameInFlight ( uint32_t maxFrameInFlight)
inline
参数
maxFrameInFlightcpu可以比gpu快多少帧
注解
必须在渲染之前调用

在文件 Context.hpp26 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ onWindowBound()

void FCT::Context::onWindowBound ( Window * wnd)
inline

在文件 Context.h163 行定义.

函数调用图:

◆ operator bool()

FCT::RefCount::operator bool ( ) const
inlineinherited

在文件 RefCount.h22 行定义.

◆ postLogicTask()

void FCT::Context::postLogicTask ( const std::function< void()> & task)
inlineprotected

在文件 Context.h151 行定义.

这是这个函数的调用关系图:

◆ release()

void FCT::RefCount::release ( )
inlineinherited

在文件 RefCount.h13 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ removeModule()

template<typename T>
void FCT::Context::removeModule ( )

在文件 Context.h292 行定义.

这是这个函数的调用关系图:

◆ submitThread()

void FCT::Context::submitThread ( )
inline

在文件 Context.hpp7 行定义.

函数调用图:
这是这个函数的调用关系图:

◆ submitTickers()

auto & FCT::Context::submitTickers ( )
inline

在文件 Context.h142 行定义.

◆ subscribe()

SubscribeId FCT::IEventSystem< EventSystemConfig::TriggerOnly >::subscribe ( Func && func)
inlineinherited

在文件 IEventSystem.h192 行定义.

◆ syncTickers()

auto & FCT::Context::syncTickers ( )
inline

在文件 Context.h137 行定义.

◆ trigger()

void FCT::IEventSystem< EventSystemConfig::TriggerOnly >::trigger ( const Event & event)
inlineinherited

在文件 IEventSystem.h110 行定义.

这是这个函数的调用关系图:

◆ unsubscribe()

void FCT::IEventSystem< EventSystemConfig::TriggerOnly >::unsubscribe ( SubscribeId subscribeId)
inlineinherited

在文件 IEventSystem.h226 行定义.

◆ unsubscribeAll()

void FCT::IEventSystem< EventSystemConfig::TriggerOnly >::unsubscribeAll ( )
inlineinherited

在文件 IEventSystem.h239 行定义.

◆ update()

void FCT::IEventSystem< EventSystemConfig::TriggerOnly >::update ( )
inlineinherited

在文件 IEventSystem.h165 行定义.

◆ updateAll()

void FCT::IEventSystem< EventSystemConfig::TriggerOnly >::updateAll ( )
inlineinherited

在文件 IEventSystem.h180 行定义.

类成员变量说明

◆ m_bindWindows

std::vector<Window*> FCT::Context::m_bindWindows
protected

在文件 Context.h218 行定义.

◆ m_cmdGraph

CommandBufferGraph* FCT::Context::m_cmdGraph
protected

在文件 Context.h211 行定义.

◆ m_compiler

ShaderCompiler* FCT::Context::m_compiler
protected

在文件 Context.h209 行定义.

◆ m_ctxRunning

bool FCT::Context::m_ctxRunning
protected

在文件 Context.h222 行定义.

◆ m_currentFlush

bool FCT::Context::m_currentFlush
protected

在文件 Context.h220 行定义.

◆ m_descriptorPool

RHI::DescriptorPool* FCT::Context::m_descriptorPool
protected

在文件 Context.h226 行定义.

◆ m_eventQueue

std::conditional_t<EventSystemConfig::TriggerOnly::EnableQueue, std::unordered_map<entt::id_type, std::vector<std::function<void()> > >, std::monostate> FCT::IEventSystem< EventSystemConfig::TriggerOnly >::m_eventQueue
privateinherited

在文件 IEventSystem.h104 行定义.

◆ m_flowControl

FlowControl* FCT::Context::m_flowControl
protected

在文件 Context.h203 行定义.

◆ m_frameIndex

size_t FCT::Context::m_frameIndex = 0
protected

在文件 Context.h227 行定义.

◆ m_generator

ShaderGenerator* FCT::Context::m_generator
protected

在文件 Context.h210 行定义.

◆ m_handlers

std::conditional_t<EventSystemConfig::TriggerOnly::EventAsData, std::unordered_map<entt::id_type, std::unordered_map<SubscribeId, std::unique_ptr<IEventHandler> > >, std::unordered_map<entt::id_type, std::unordered_map<SubscribeId, std::unique_ptr<IEventIdentifierHandler> > > > FCT::IEventSystem< EventSystemConfig::TriggerOnly >::m_handlers
privateinherited

在文件 IEventSystem.h100 行定义.

◆ m_imageLoader

ImageLoader* FCT::Context::m_imageLoader
protected

在文件 Context.h207 行定义.

◆ m_logicFrameIndex

size_t FCT::Context::m_logicFrameIndex = 0
protected

在文件 Context.h228 行定义.

◆ m_logicTask

boost::lockfree::queue<LogicTaskData*,boost::lockfree::capacity<1024> > FCT::Context::m_logicTask
protected

在文件 Context.h150 行定义.

◆ m_maxFrameInFlight

uint32_t FCT::Context::m_maxFrameInFlight
protected

在文件 Context.h224 行定义.

◆ m_modelLoader

ModelLoader* FCT::Context::m_modelLoader
protected

在文件 Context.h205 行定义.

◆ m_nextFrame

bool FCT::Context::m_nextFrame
protected

在文件 Context.h219 行定义.

◆ m_nextSubscribeId

SubscribeId FCT::IEventSystem< EventSystemConfig::TriggerOnly >::m_nextSubscribeId
privateinherited

在文件 IEventSystem.h106 行定义.

◆ m_refCount

std::atomic<size_t> FCT::RefCount::m_refCount
protectedinherited

在文件 RefCount.h30 行定义.

◆ m_renderGraph

RenderGraph* FCT::Context::m_renderGraph
protected

在文件 Context.h206 行定义.

◆ m_resourceDevice

Device* FCT::Context::m_resourceDevice
protected

在文件 Context.h204 行定义.

◆ m_resourceManager

ResourceManager* FCT::Context::m_resourceManager
protected

在文件 Context.h208 行定义.

◆ m_submitFrameIndex

size_t FCT::Context::m_submitFrameIndex = 0
protected

在文件 Context.h229 行定义.

◆ m_submitThread

std::thread FCT::Context::m_submitThread
protected

在文件 Context.h221 行定义.

◆ m_submitThreadId

std::thread::id FCT::Context::m_submitThreadId
protected

在文件 Context.h230 行定义.

◆ m_ticker

SubmitTicker FCT::Context::m_ticker
protected

在文件 Context.h217 行定义.


该类的文档由以下文件生成: