118 template <
typename T>
120 template <
typename T>
122 template <
typename T>
126 template <
typename T>
162 boost::lockfree::queue<LogicTaskData*,boost::lockfree::capacity<1024>>
m_logicTask;
185 void createCompiler();
195 void _currentFlush();
286 template <
typename T>
289 if constexpr (std::is_same_v<T, ResourceManager>)
293 else if constexpr (std::is_same_v<T, RenderGraph>)
299 ferr <<
"Unsupported module type: " <<
typeid(T).name() << std::endl;
303 template <
typename T>
306 if constexpr (std::is_same_v<T, ResourceManager>)
311 ferr <<
"Unsupported module type: " <<
typeid(T).name() << std::endl;
316 template <
typename T>
320 if constexpr (std::is_same_v<T, ResourceManager>)
324 else if constexpr (std::is_same_v<T, Device>)
328 else if constexpr (std::is_same_v<T, RenderGraph>)
332 else if constexpr (std::is_same_v<T, CommandBufferGraph>)
338 ferr <<
"try to get undefined context module." << std::endl;
#define FCT_DECLARE_FLAGS(BitType)
#define FCT_NEW(type,...)
#define FCT_SAFE_DELETE(var)
#define FCT_SAFE_NEW(var, type,...)
void postLogicTask(const std::function< void()> &task)
uint32_t m_maxFrameInFlight
RenderGraph * m_renderGraph
ShaderCompiler * getCompiler()
size_t m_submitFrameIndex
void maxFrameInFlight(uint32_t maxFrameInFlight)
uint32_t currentLogicFrameIndex() const
RHI::DescriptorPool * m_descriptorPool
ShaderCompiler * m_compiler
ModelLoader * m_modelLoader
ShaderGenerator * getGenerator()
Image * loadTexture(const std::string &filename)
const std::vector< Window * > & getBindWindows()
uint32_t currentFrameIndex()
std::thread m_submitThread
ImageLoader * m_imageLoader
StaticMesh< uint32_t > * createMesh(const ModelMesh *modelMesh, const VertexLayout &layout)
uint32_t maxFrameInFlight() const
CommandBufferGraph * m_cmdGraph
virtual bool isIntegrateGpu()=0
constexpr void _waitCurrentFlush()
ResourceManager * m_resourceManager
virtual void createPlatform()=0
Device * m_resourceDevice
virtual RHI::RasterizationPipeline * createTraditionPipeline()=0
FlowControl * m_flowControl
constexpr void _waitForNextFrame()
std::vector< Window * > m_bindWindows
uint32_t currentSubmitFrameIndex() const
ShaderGenerator * m_generator
void create(ContextCreateFlags flag=ContextCreateFlag::defaultConfig)
Context(Runtime *runtime)
void advanceSubmitFrame()
void onWindowBound(Window *wnd)
StaticMesh< uint32_t > * loadMesh(const std::string &filename, const std::string &meshName, const VertexLayout &layout)
std::thread::id m_submitThreadId
boost::lockfree::queue< LogicTaskData *, boost::lockfree::capacity< 1024 > > m_logicTask
void trigger(const Event &event)
constexpr const char * CheckRecreateSwapchainSync
constexpr const char * AdvanceFrameIndex
@ withModuleResourceManage
@ withAutoMaxFrameInFlight
constexpr const char * RenderGraphSyncTicker_SwapJobQueueName
constexpr const char * RenderGraphExcutePassSubmitTickerName
constexpr const char * SwapBufferSubmitTicker
constexpr const char * RenderGraphSubmitTickerName
std::function< void()> SubmitTicker
std::function< void()> task