MCPcopy Create free account
hub / github.com/MethanePowered/MethaneKit / Init

Method Init

Modules/Graphics/App/Sources/Methane/Graphics/AppBase.cpp:149–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149void AppBase::Init()
150{
151 META_FUNCTION_TASK();
152 META_LOG("\n======================== APP INITIALIZATION ========================");
153
154 if (!m_settings.animations_enabled)
155 {
156 m_settings.animations_enabled = true;
157 SetBaseAnimationsEnabled(false);
158 }
159
160 const Rhi::RenderContextSettings& context_settings = m_context.GetSettings();
161
162 // Create frame depth texture and attachment description
163 if (context_settings.depth_stencil_format != PixelFormat::Unknown)
164 {
165 m_depth_texture = m_context.CreateTexture(Rhi::TextureSettings::ForDepthStencil(m_context.GetSettings()));
166 m_depth_texture.SetName("Depth Texture");
167 }
168
169 // Create screen render pass pattern
170 m_screen_render_pattern = m_context.CreateRenderPattern(m_screen_pass_pattern_settings);
171 m_screen_render_pattern.SetName("Final Render Pass");
172
173 m_view_state = Rhi::ViewState({
174 { GetFrameViewport(context_settings.frame_size) },
175 { GetFrameScissorRect(context_settings.frame_size) }
176 });
177
178 Platform::App::Init();
179}
180
181void AppBase::StartResizing()
182{

Callers

nothing calls this directly

Calls 6

GetFrameViewportFunction · 0.85
GetFrameScissorRectFunction · 0.85
ViewStateClass · 0.50
CreateTextureMethod · 0.45
SetNameMethod · 0.45
CreateRenderPatternMethod · 0.45

Tested by

no test coverage detected