/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once #include "calls/group/calls_group_viewport.h" #include "ui/gl/gl_surface.h" #include #include namespace Calls::Group { class Viewport::RendererGL final : public Ui::GL::Renderer { public: explicit RendererGL(not_null owner); void free(const Textures &textures); void init( not_null widget, not_null f) override; void deinit( not_null widget, not_null f) override; void resize( not_null widget, not_null f, int w, int h) override; void paint( not_null widget, not_null f) override; private: void fillBackground(not_null f); void paintTile( not_null f, not_null tile); void freeTextures(not_null f); const not_null _owner; QSize _viewport; std::optional _frameBuffer; std::optional _bgBuffer; std::optional _frameProgram; std::optional _bgProgram; std::vector _bgTriangles; std::vector _texturesToFree; }; } // namespace Calls::Group