113 template <
typename T>
115 template <
typename T>
117 template <
typename T>
121 template <
typename T>
150 boost::lockfree::queue<LogicTaskData*,boost::lockfree::capacity<1024>>
m_logicTask;
173 void createCompiler();
183 void _currentFlush();
274 template <
typename T>
277 if constexpr (std::is_same_v<T, ResourceManager>)
281 else if constexpr (std::is_same_v<T, RenderGraph>)
287 ferr <<
"Unsupported module type: " <<
typeid(T).name() << std::endl;
291 template <
typename T>
294 if constexpr (std::is_same_v<T, ResourceManager>)
299 ferr <<
"Unsupported module type: " <<
typeid(T).name() << std::endl;
304 template <
typename T>
308 if constexpr (std::is_same_v<T, ResourceManager>)
312 else if constexpr (std::is_same_v<T, Device>)
316 else if constexpr (std::is_same_v<T, RenderGraph>)
320 else if constexpr (std::is_same_v<T, CommandBufferGraph>)
326 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
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
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