mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-11-01 04:40:05 +00:00
Remove GlContext from MapContext, layers receive MapContext from Initialize/Render
This commit is contained in:
parent
2d4ad2737e
commit
44a864f50f
25 changed files with 446 additions and 398 deletions
|
|
@ -5,33 +5,34 @@
|
|||
namespace scwx::qt::map
|
||||
{
|
||||
|
||||
class OverlayLayerImpl;
|
||||
|
||||
class OverlayLayer : public DrawLayer
|
||||
{
|
||||
Q_DISABLE_COPY_MOVE(OverlayLayer)
|
||||
|
||||
public:
|
||||
explicit OverlayLayer(const std::shared_ptr<MapContext>& context);
|
||||
explicit OverlayLayer(const std::shared_ptr<gl::GlContext>& glContext);
|
||||
~OverlayLayer();
|
||||
|
||||
void Initialize() override final;
|
||||
void Render(const QMapLibre::CustomLayerRenderParameters&) override final;
|
||||
void Deinitialize() override final;
|
||||
void Initialize(const std::shared_ptr<MapContext>& mapContext) final;
|
||||
void Render(const std::shared_ptr<MapContext>& mapContext,
|
||||
const QMapLibre::CustomLayerRenderParameters&) final;
|
||||
void Deinitialize() final;
|
||||
|
||||
bool RunMousePicking(
|
||||
const QMapLibre::CustomLayerRenderParameters& params,
|
||||
const QPointF& mouseLocalPos,
|
||||
const QPointF& mouseGlobalPos,
|
||||
const glm::vec2& mouseCoords,
|
||||
const common::Coordinate& mouseGeoCoords,
|
||||
std::shared_ptr<types::EventHandler>& eventHandler) override final;
|
||||
bool
|
||||
RunMousePicking(const std::shared_ptr<MapContext>& mapContext,
|
||||
const QMapLibre::CustomLayerRenderParameters& params,
|
||||
const QPointF& mouseLocalPos,
|
||||
const QPointF& mouseGlobalPos,
|
||||
const glm::vec2& mouseCoords,
|
||||
const common::Coordinate& mouseGeoCoords,
|
||||
std::shared_ptr<types::EventHandler>& eventHandler) final;
|
||||
|
||||
public slots:
|
||||
void UpdateSweepTimeNextFrame();
|
||||
|
||||
private:
|
||||
std::unique_ptr<OverlayLayerImpl> p;
|
||||
class Impl;
|
||||
std::unique_ptr<Impl> p;
|
||||
};
|
||||
|
||||
} // namespace scwx::qt::map
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue