#include #include #pragma warning(push, 0) #include #include #include #pragma warning(pop) namespace scwx { namespace qt { namespace gl { namespace draw { static const std::string logPrefix_ = "scwx::qt::gl::draw::draw_item"; class DrawItem::Impl { public: explicit Impl(OpenGLFunctions& gl) : gl_ {gl} {} ~Impl() {} OpenGLFunctions& gl_; }; DrawItem::DrawItem(OpenGLFunctions& gl) : p(std::make_unique(gl)) {} DrawItem::~DrawItem() = default; DrawItem::DrawItem(DrawItem&&) noexcept = default; DrawItem& DrawItem::operator=(DrawItem&&) noexcept = default; void DrawItem::UseDefaultProjection( const QMapbox::CustomLayerRenderParameters& params, GLint uMVPMatrixLocation) { glm::mat4 projection = glm::ortho(0.0f, static_cast(params.width), 0.0f, static_cast(params.height)); p->gl_.glUniformMatrix4fv( uMVPMatrixLocation, 1, GL_FALSE, glm::value_ptr(projection)); } } // namespace draw } // namespace gl } // namespace qt } // namespace scwx