internal MyGeometryRenderer(MyDynamicAABBTreeD renderablesDBVH, MyShadows shadowHandler) { m_renderablesDBVH = renderablesDBVH; m_shadowHandler = shadowHandler; m_cullQuery = new MyCullQuery(); m_visibilityCuller = new MyFrustumCuller(); m_renderingDispatcher = new MyRenderingDispatcher(); }
internal static void Render() { MyRender11.GetRenderProfiler().StartProfilingBlock("Preparations"); PrepareFrame(); PrepareCulling(); UpdateEnvironmentProbes(); MyRender11.GetRenderProfiler().EndProfilingBlock(); MyRender11.GetRenderProfiler().StartProfilingBlock("DispatchCulling"); DispatchCulling(); MyRender11.GetRenderProfiler().EndProfilingBlock(); MyRender11.GetRenderProfiler().StartProfilingBlock("DispatchRendering"); if (MyRender11.LoopObjectThenPass) { MyRenderingDispatcher.Dispatch_LoopObjectThenPass(Wavefront, m_cullQuery, m_commandListQueue); } else { MyRenderingDispatcher.Dispatch_LoopPassThenObject(Wavefront, m_cullQuery, m_commandListQueue); } MyRender11.GetRenderProfiler().EndProfilingBlock(); MyRender11.GetRenderProfiler().StartProfilingBlock("SendOutputMessages"); SendOutputMessages(); MyRender11.GetRenderProfiler().EndProfilingBlock(); MyRender11.GetRenderProfiler().StartProfilingBlock("ExecuteCommandLists"); while (m_commandListQueue.Count > 0) { var commandList = m_commandListQueue.Dequeue(); MyRender11.ImmediateContext.ExecuteCommandList(commandList, false); commandList.Dispose(); } MyRender11.GetRenderProfiler().EndProfilingBlock(); FinalizeEnvProbes(); }