Go to the documentation of this file. 1 #ifndef MYTHPAINTER_OPENGL_H_
2 #define MYTHPAINTER_OPENGL_H_
10 #include <QRecursiveMutex>
21 class QOpenGLFramebufferObject;
22 class QOpenGLShaderProgram;
34 void DeleteTextures(
void);
36 QString
GetName(
void)
override {
return {
"OpenGL"}; }
41 void Begin(QPaintDevice *Parent)
override;
46 void DrawRect(QRect Area,
const QBrush &FillBrush,
47 const QPen &LinePen,
int Alpha)
override;
49 const QBrush &FillBrush,
const QPen &LinePen,
int Alpha)
override;
54 void ClearCache(
void);
56 QOpenGLShaderProgram* GetProceduralShader(
const ProcSource& VertexSource,
const ProcSource& FragmentSource,
const QString& SourceHash);
70 std::array<QOpenGLBuffer*,MAX_BUFFER_POOL> m_mappedBufferPool {
nullptr };
71 size_t m_mappedBufferPoolIdx { 0 };
72 bool m_mappedBufferPoolReady {
false };
std::list< MythImage * > m_imageExpireList
bool SupportsAlpha(void) override
virtual void DrawProcedural(QRect, int, const ProcSource &, const ProcSource &, const QString &)
MythImage * GetFormatImagePriv(void) override
Creates a reference counted image, call DecrRef() to delete.
QRecursiveMutex m_imageAndTextureLock
static constexpr size_t MAX_BUFFER_POOL
virtual void DrawRect(QRect area, const QBrush &fillBrush, const QPen &linePen, int alpha)
bool SupportsAnimation(void) override
virtual void DeleteFormatImagePriv(MythImage *im)=0
bool SupportsClipping(void) override
virtual void DrawImage(QRect dest, MythImage *im, QRect src, int alpha)=0
virtual void FreeResources(void)
QHash< QString, QOpenGLShaderProgram * > m_procedurals
std::shared_ptr< QByteArray > ProcSource
QString GetName(void) override
QVector< MythGLTexture * > m_mappedTextures
virtual void PopTransformation(void)
virtual void Begin(QPaintDevice *)
virtual void DrawRoundRect(QRect area, int cornerRadius, const QBrush &fillBrush, const QPen &linePen, int alpha)
QMap< MythImage *, MythGLTexture * > m_imageToTextureMap
std::list< MythGLTexture * > m_textureDeleteList
virtual void PushTransformation([[maybe_unused]] const UIEffects &zoom, [[maybe_unused]] QPointF center=QPointF())