MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Init

Method Init

Source/Engine/Renderer/Renderer.cpp:72–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70void RenderInner(SceneRenderTask* task, RenderContext& renderContext, RenderContextBatch& renderContextBatch);
71
72bool RendererService::Init()
73{
74 PROFILE_MEM(Graphics);
75
76 // Register passes
77 PassList.EnsureCapacity(64);
78 PassList.Add(GBufferPass::Instance());
79 PassList.Add(ShadowsPass::Instance());
80 PassList.Add(LightPass::Instance());
81 PassList.Add(ForwardPass::Instance());
82 PassList.Add(ReflectionsPass::Instance());
83 PassList.Add(ScreenSpaceReflectionsPass::Instance());
84 PassList.Add(AmbientOcclusionPass::Instance());
85 PassList.Add(DepthOfFieldPass::Instance());
86 PassList.Add(ColorGradingPass::Instance());
87 PassList.Add(VolumetricFogPass::Instance());
88 PassList.Add(EyeAdaptationPass::Instance());
89 PassList.Add(PostProcessingPass::Instance());
90 PassList.Add(MotionBlurPass::Instance());
91 PassList.Add(MultiScaler::Instance());
92 PassList.Add(BitonicSort::Instance());
93 PassList.Add(FXAA::Instance());
94 PassList.Add(TAA::Instance());
95 PassList.Add(SMAA::Instance());
96 PassList.Add(HistogramPass::Instance());
97 PassList.Add(GlobalSignDistanceFieldPass::Instance());
98 PassList.Add(GlobalSurfaceAtlasPass::Instance());
99 PassList.Add(DynamicDiffuseGlobalIlluminationPass::Instance());
100#if USE_EDITOR
101 PassList.Add(QuadOverdrawPass::Instance());
102#endif
103
104 // Skip when using Null renderer
105 if (GPUDevice::Instance->GetRendererType() == RendererType::Null)
106 {
107 return false;
108 }
109
110#if GPU_ENABLE_PRELOADING_RESOURCES
111 // Init child services
112 for (int32 i = 0; i < PassList.Count(); i++)
113 {
114 if (PassList[i]->Init())
115 {
116 LOG(Fatal, "Cannot init {0}. Please see a log file for more info.", PassList[i]->ToString());
117 return true;
118 }
119 }
120#endif
121
122 return false;
123}
124
125void RendererService::Dispose()
126{

Callers 4

InitAtmospherePreComputeFunction · 0.45
setupResourcesMethod · 0.45
LazyInitMethod · 0.45
InitShaderMethod · 0.45

Calls 5

InstanceClass · 0.50
EnsureCapacityMethod · 0.45
AddMethod · 0.45
CountMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected