MCPcopy Create free account
hub / github.com/comaps/comaps / CreateEngine

Method CreateEngine

qt/qt_common/map_widget.cpp:108–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void MapWidget::CreateEngine()
109{
110 Framework::DrapeCreationParams p;
111
112 p.m_apiVersion = dp::ApiVersion::OpenGLES3;
113
114 p.m_surfaceWidth = m_screenshotMode ? width() : static_cast<int>(m_ratio * width());
115 p.m_surfaceHeight = m_screenshotMode ? height() : static_cast<int>(m_ratio * height());
116 p.m_visualScale = static_cast<float>(m_ratio);
117 p.m_hints.m_screenshotMode = m_screenshotMode;
118
119 m_skin.reset(new gui::Skin(gui::ResolveGuiSkinFile("default"), m_ratio));
120 m_skin->Resize(p.m_surfaceWidth, p.m_surfaceHeight);
121 m_skin->ForEach([&p](gui::EWidget widget, gui::Position const & pos) { p.m_widgetsInitInfo[widget] = pos; });
122
123 p.m_widgetsInitInfo[gui::WIDGET_SCALE_FPS_LABEL] = gui::Position(dp::LeftTop);
124
125 m_framework.CreateDrapeEngine(make_ref(m_contextFactory), std::move(p));
126 m_framework.SetViewportListener(std::bind(&MapWidget::OnViewportChanged, this, std::placeholders::_1));
127}
128
129void MapWidget::ScalePlus()
130{

Callers

nothing calls this directly

Calls 8

ResolveGuiSkinFileFunction · 0.85
make_refFunction · 0.85
SetViewportListenerMethod · 0.80
PositionClass · 0.50
resetMethod · 0.45
ResizeMethod · 0.45
ForEachMethod · 0.45
CreateDrapeEngineMethod · 0.45

Tested by

no test coverage detected