void Framework::ShowRect(bool needApiPin, m2::PointD const & apiPinPoint, bool needMyLoc, m2::PointD const & myLocPoint) { InitRenderPolicy(needApiPin, apiPinPoint, needMyLoc, myLocPoint); RenderMap(); TeardownRenderPolicy(); }
void DrawWidget::SetMapStyle(MapStyle mapStyle) { #ifndef USE_DRAPE if (m_framework->GetMapStyle() == mapStyle) return; makeCurrent(); m_framework->SetRenderPolicy(nullptr); m_framework->SetMapStyle(mapStyle); // init new render policy InitRenderPolicy(); m_framework->SetUpdatesEnabled(true); #endif }
void DrawWidget::initializeGL() { // we'll perform swap by ourselves, see issue #333 setAutoBufferSwap(false); if (!m_isInitialized) { #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) m_ratio = dynamic_cast<QApplication*>(qApp)->devicePixelRatio(); #endif #ifndef USE_DRAPE m_videoTimer.reset(CreateVideoTimer()); InitRenderPolicy(); #endif m_isInitialized = true; } }